Results 1 to 6 of 6

Thread: Linux memory usage????

Hybrid View

  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
  •  


Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray picture

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray

$39.99



Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A

$64.00



Seagate BarraCuda 28TB 7.2K SATA 6Gb/s 3.5in Internal HDD ST28000DM000 - Tested picture

Seagate BarraCuda 28TB 7.2K SATA 6Gb/s 3.5in Internal HDD ST28000DM000 - Tested

$670.00



Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5

Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive

$318.99



Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4 picture

Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4

$39.00



Seagate ST500DM009 BarraCuda 500 GB 3.5

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive

$14.99



HGST HUS724040ALA640 HDD 4TB SATA 6Gb/s 7.5K 3.5

HGST HUS724040ALA640 HDD 4TB SATA 6Gb/s 7.5K 3.5" 0F19459 512 b/s

$78.00



Toshiba 14TB MG07 MG07ACA14TEY 7.2K RPM SATA 6Gb/s 512e 3.5

Toshiba 14TB MG07 MG07ACA14TEY 7.2K RPM SATA 6Gb/s 512e 3.5" Enterprise HDD

$329.00



DELL 2TB Enterprise HDD (7200RPM, 3.5

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600

$49.95



Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS picture

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS

$184.99