The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Question about RAM usage and linux live cd

    Discussion in 'Linux Compatibility and Software' started by talin, Mar 3, 2011.

  1. talin

    talin Notebook Prophet

    Reputations:
    4,694
    Messages:
    5,343
    Likes Received:
    2
    Trophy Points:
    205
    If anyone can answer this I'd greatly appreciate it. :) For a long time I was running ubuntu from a live disc, 32-bit version. I have 4GB RAM installed, and it would say I had 1.3GB RAM available. Now I switched to the 64-bit version, and it says I have only 1.8GB RAM available. Shouldn't it be ~2.3GB? Since I know 32-bit can only address 3 to ~3.2 GB.
    Not really important just curious. :)
     
  2. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    Linux is not Windows.
     
  3. weinter

    weinter /dev/null

    Reputations:
    596
    Messages:
    2,798
    Likes Received:
    1
    Trophy Points:
    56
    My guess(it is a guess only) is that the RAM is allocated to create a RAM DISK to load the squashfs for your livecd.
    The /usr, /root, etc are all virtual on your RAM doesn't exist, so the overall RAM size is cut down.
     
  4. Sxooter

    Sxooter Notebook Virtuoso

    Reputations:
    747
    Messages:
    3,784
    Likes Received:
    8
    Trophy Points:
    106
    Linux will take your spare ram and use it as a file system cache in the kernel. This will make your machine say it has 100M or so free when in fact it's got 100M free and 1.8G of cache, and the cache can be dumped on demand for more programs to run in. What does the output of "free" say on your machine?

    My machine has this:

    Code:
                total       used       free     shared    buffers     cached
    Mem:       7858964    7719040     139924          0      69944    5347752
    -/+ buffers/cache:    2301344    5557620
    Swap:      4385788       2720    4383068
    
    Note that it says I have 139M free. but also I have 5.3G cached.
     
  5. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Yeah what Sxooter said, post the output of free -m

    However, 64 bit linux will use more memory than 32 bit, for one thing because pointers are twice as big. Also 32 bit isn't limited to ~3.5GB if you have PAE support in the kernel, offhand I don't know if ubuntu does or does not.
     
  6. talin

    talin Notebook Prophet

    Reputations:
    4,694
    Messages:
    5,343
    Likes Received:
    2
    Trophy Points:
    205
    Great tip, ok here's mine. :)

    Code:
                 total       used       free     shared    buffers     cached
    Mem:          3761       1042       2719          0        109        508
    -/+ buffers/cache:        424       3336
    Swap:            0          0          0
    
    Yet when I go to any folder, at the bottom it says: free space 1.8GB. I know that's a real limitation, because recently I had downloaded some stuff and attempted to make a disc, it had ran out of space and I had to scale back the disc (make 2 instead of 1). As a matter of fact the total disc size was around 1gb, and it obviously had to use 2gb for the iso as well.
    So I'm not sure what to think.
     
  7. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    If you download a file it will be stored in a RAM disc which is mounted from /dev/shm. The default kernel config is that this RAM disc can not be bigger than half of your total RAM. Therefore with 3.6GB of RAM /dev/shm will provide up to 1.8GB.
     
  8. talin

    talin Notebook Prophet

    Reputations:
    4,694
    Messages:
    5,343
    Likes Received:
    2
    Trophy Points:
    205
    I see. That makes a lot of sense. So realistically, if I had 8GB RAM, only 4GB would really be available. Thanks debguy. :)