Results 1 to 6 of 6

Thread: Linux memory usage????

  1. #1
    Junior Member registered user
    Join Date
    Aug 2006
    Posts
    20

    Linux memory usage????

    Right after boot my linux sys takes only 16mb of ram. After some compiling, say the kernel, it takes 110mb of ram, which is a lot in my 128mb-laptop.
    Only the same processes that started on boot are still running. Waiting 10min didn't help at all...

    Why doesn't the kernel free the unused memory? Or if it does, why does it do it so slowly and how could I improve it?

  2. #2
    Banned
    Join Date
    Feb 2005
    Location
    Sydney Australia
    Posts
    264
    it's a common question for linux users
    check the smoothwall pages ....

    linux will cache your hard drive accesses, so it uses memory, but more cache/swap rather than in memory

  3. #3
    Senior Member registered user
    Join Date
    Aug 2004
    Location
    Sydney/Australia
    Posts
    311
    Linux will cache memory to speed up application performance that may wish to reuse the memory. It is a good thing.

    >>
    Why doesn't the kernel free the unused memory? Or if it does, why does it do it so slowly and how could I improve it
    >>

    It will free it when/if it's needed.

    You don't mention the kernel, iirc 2.6.8 or .9 vanilla did have problems with memory/swap usage. But it was fixed in the following version.


    jm

  4. #4
    Junior Member registered user
    Join Date
    Feb 2006
    Posts
    17

    Memory use

    With only 128MB of RAM to play with I would consider making and using either a swap partition or swap file. As a general rule of thumb I've been informed that a swap partition should be no more than twice the physical memory size wise. So with 128MB memory, a 256MB swap would be good. Larger would work but it would put a greater strain on the hard drive - possibly leading the drive to fail quicker than would otherwise be the case. If your computer will handle it an additional RAM card would be the best solution though.

  5. #5
    Junior Member registered user
    Join Date
    Aug 2006
    Posts
    20
    My kernel's 2.6.16.37, and I do have a 256-mb swap partition.

    I just wondered the ram usage. Actually I've never seen the swap partition to have any use,
    when I check it with free.

  6. #6
    Senior Member registered user
    Join Date
    Aug 2004
    Location
    Sydney/Australia
    Posts
    311

    speed, cache, swap size, ram and deamons

    Howdy,

    slvrldy17 wrote:
    >>
    So with 128MB memory, a 256MB swap would be good. Larger would work but it would put a greater strain on the hard drive
    >>

    General rules are just that, and i don't see how the actual size effect drive wear. Unless your talking about the head having to traverse it.

    Not really an issue, good buffering of output would be more useful, along with anticipatory facilities (the i/o schedular)

    The thing with swap, if you have a good size of ram available you may well see very little use of swap. But it depends on what your running and how many programs your running.

    If your going to remaster/create dvd iso's, then you may well need large amounts of swap. I have heard people talk in the range of 5Gib's. But as i haven't tried dvd creation as yet i can't really testify to that directly.

    512 Mib's isn't a bad stand by though. That should cover you for any general compression activities you may do, involving large files/directories.

    I have heard of some Linux OS's not installing unless 1Gib of swap could be created, to be part of the install. One of the RH's i think. Again i'm not completely sure there.

    Earlier kernel, that is, earlier to the current 2.6 range had a limit to the swap they could use. Which was around 256 or so Mib's. But things have moved on from there.

    Also, if you find that when you actually need swap to be available, such as, for compression, if it isn't there then you could have programs failing or freeze ups.

    A person can always add an extra swap partition in that case, but then they have to ceate/configure it and add a /etc/fstab entry, do a man page look up etc.

    I'd go for a 512 Mib min as the disc space will likely be there.

    If it's going to be rearly used, then put it down the back of the drive if you can. Or on another drive that will spend most of its' time powered down.

    If your having a speed/performance issue it will more likely be something to do with dma or some update deamon facility hogging cycles. Check on the services you start at boot and close down all the stuff you don't really need. Especiall auto updaters. I think SuSE has an issue there.

    The caching behavoure of Linux will actually make things run better on restarting programs that have been closed. And will free it self as needed.

    Back ground deamons arn't that smart though


    jm

Similar Threads

  1. Checking CPU Usage in Knoppix
    By ddrattack in forum General Support
    Replies: 2
    Last Post: 03-20-2008, 02:44 AM
  2. Decrease knopix memory usage?
    By lerra in forum Hardware & Booting
    Replies: 1
    Last Post: 01-27-2006, 11:41 PM
  3. Boot up/memory problem (new to Linux)
    By benedict1000 in forum General Support
    Replies: 2
    Last Post: 07-30-2004, 11:47 AM
  4. root usage
    By Alexxx in forum General Support
    Replies: 2
    Last Post: 03-03-2004, 11:53 PM
  5. Cheat Code Usage
    By hankster in forum General Support
    Replies: 1
    Last Post: 04-04-2003, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


RAM-HOL-SAM52CPU RAM USB-C Powered Dock Samsung Tab Active4 Pro & Tab Active Pro picture

RAM-HOL-SAM52CPU RAM USB-C Powered Dock Samsung Tab Active4 Pro & Tab Active Pro

$81.99



Samsung 2.5

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot

$60.00



Samsung 870 EVO 4TB 2.5

Samsung 870 EVO 4TB 2.5" SATA III Internal SSD (MZ-77E4T0B/AM)

$310.00



New Samsung 512GB FIT Plus USB 3.2 Gen 1 Type-A Flash Drive MUF-512AB/AM NEW picture

New Samsung 512GB FIT Plus USB 3.2 Gen 1 Type-A Flash Drive MUF-512AB/AM NEW

$120.00



RAM-HOL-SAM60CPU RAM USB-C Powered Dock for Samsung Tab Active5 - 3 - 2 picture

RAM-HOL-SAM60CPU RAM USB-C Powered Dock for Samsung Tab Active5 - 3 - 2

$81.99



Samsung PM961 512GB PCIe Gen 3x4 NVMe 2280 M.2 SSD MZVLW512HMJP-000D1 picture

Samsung PM961 512GB PCIe Gen 3x4 NVMe 2280 M.2 SSD MZVLW512HMJP-000D1

$60.00



RAM-GDS-SKIN-SAM54-NG-1 RAM Mounts IntelliSkin® Next Gen for Samsung Tab Active4 picture

RAM-GDS-SKIN-SAM54-NG-1 RAM Mounts IntelliSkin® Next Gen for Samsung Tab Active4

$93.99



Samsung 8GB DDR5 5600MHz SODIMM Laptop RAM PC5-44800 CL46 M425R1GB4BB0-CWM picture

Samsung 8GB DDR5 5600MHz SODIMM Laptop RAM PC5-44800 CL46 M425R1GB4BB0-CWM

$99.99



NEW Samsung NoteBook NT930QCG touch LCD Full Screen Assembly Blue picture

NEW Samsung NoteBook NT930QCG touch LCD Full Screen Assembly Blue

$225.77



Original for Samsung NP950QCG-K01US LCD Screen Touch Full Top Assembly FHD Blue picture

Original for Samsung NP950QCG-K01US LCD Screen Touch Full Top Assembly FHD Blue

$299.00