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
  •  


Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM picture

Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM

$1625.00



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



VMware vCenter Server 8 STANDARD Perpetual License Key VC-STD-C (Legacy Pack) picture

VMware vCenter Server 8 STANDARD Perpetual License Key VC-STD-C (Legacy Pack)

$1599.95



867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001 picture

867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001

$225.00



Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p picture

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p

$499.88



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$368.00



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Windows Server 2025 datacenter 64bit 24 Core 50 cal DVD + PRODUCT LICENSE KEY picture

Windows Server 2025 datacenter 64bit 24 Core 50 cal DVD + PRODUCT LICENSE KEY

$44.54



HP ProLiant ML30 Gen9 Tower Server Xeon E3-1230 v5 8GB 1TB No OS picture

HP ProLiant ML30 Gen9 Tower Server Xeon E3-1230 v5 8GB 1TB No OS

$152.47