Results 1 to 20 of 20
  1. #1
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231

    Average amount of free memory

    About how much free memory should your webserver maintain? My server seems to be using alot and its causing slowdowns often.

    Also, when running "top". i find multiple httpd processes running at once, sometimes over 20. is there a reason for this?

  2. #2
    Join Date
    Sep 2003
    Posts
    120
    How much Ram is installed in your box ?

  3. #3
    Join Date
    Sep 2001
    Location
    Seattle, WA
    Posts
    3,084
    Make sure you are looking at the output of 'free' when trying to determine how much RAM you're using. The numbers listed in top include buffers (linux overzealously buffers anything it can, if memory is available. So a linux system will quickly gobble up most of the available memory, although it'd be safe to get rid of the cached files).

    Apache has a main daemon that accepts requests and then delegates to a child thread which actually does the request. That is why there is more than one listed.
    Jim Reardon - jim/amusive.com

  4. #4
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231
    Currently have 512 in this server, whats is a good amount to have free?

  5. #5
    Join Date
    Sep 2001
    Location
    Seattle, WA
    Posts
    3,084
    You don't really need any free RAM whatsoever. The thing you need to watch for is when you start using a lot of swap (using some is completely normal... 50-100K probably, maybe a bit more).

    Once you start using more, you'll notice slowdown because more than which is ideal is being stored outside of your main RAM.
    Jim Reardon - jim/amusive.com

  6. #6
    Join Date
    Feb 2003
    Location
    Kuala Lumpur, Malaysia
    Posts
    4,974
    As long as it doesn't use much of SWAP then you should be fine.

  7. #7
    indeed lots of SWAP is baaaaaddd!
    John Heslop

  8. #8
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231
    Is this bad?


    -----------------------------------------------------------------------------------
    [[email protected] /]# free
    total used free shared buffers cached

    Mem: 506048 477244 28804 0 9192 125404

    -/+ buffers/cache: 342648 163400

    Swap: 1020116 398948 621168
    -----------------------------------------------------------------------------------

  9. #9
    Join Date
    Sep 2001
    Location
    Seattle, WA
    Posts
    3,084
    Using a gig of swap is almost always bad, yes.
    Jim Reardon - jim/amusive.com

  10. #10
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231
    ANy suggestions to get it to decrease?>

  11. #11
    Greetings:

    Add more RAM.

    Thank you.
    ---
    Peter M. Abraham
    LinkedIn Profile

  12. #12
    that is a option, but if your making enough to buy another server go for it, why overload a server or fill it up to the max?
    John Heslop

  13. #13
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231
    True, I guess it would make the most of sense to upgrade the memory and move on to the next server.

    So does this mean the more main memory your system is using...the more swap memory it consumes?

  14. #14
    Join Date
    Mar 2002
    Location
    Philadelphia, PA
    Posts
    2,508
    Ram is good
    Linux junkie | steward.io

  15. #15
    Join Date
    Sep 2001
    Location
    Seattle, WA
    Posts
    3,084
    Originally posted by holiday
    True, I guess it would make the most of sense to upgrade the memory and move on to the next server.

    So does this mean the more main memory your system is using...the more swap memory it consumes?
    http://computer.howstuffworks.com/virtual-memory.htm
    Jim Reardon - jim/amusive.com

  16. #16
    Join Date
    Aug 2002
    Location
    Seattle
    Posts
    5,512
    Originally posted by dynamicnet
    Greetings:

    Add more RAM.

    Thank you.


    As noted, just stay out of "swap" land, and you'll be fine regardless of how much shows as free.

  17. #17
    Join Date
    Aug 2003
    Location
    Boston:Mass
    Posts
    231
    I take it this is bad...
    Attached Thumbnails Attached Thumbnails swap.gif  

  18. #18
    no, no, no. i understand why some people are so afraid of the word swap and will put more and more memory to try and see it dissapear completely, but swap.. is nothing bad, unless your system starts actively swapping (i.e., amount of swapped data is on par with total memory installed)

    pages that are rarely if never used are being swapped away, and that's actually GOOD, more of your mem is free this way. sure, if the total mem of all your processes < your total RAM at all times, you won't have much swap. but it's impractical and silly.

    If you have 1Gb memory on your server, few hundred MBs of swap is perfectly fine. The first poster, sure, had 300MB swap on 512MB box, which is probably causing active swapping. but 100MB on 500-1000 box if fine...

  19. #19
    Join Date
    Feb 2004
    Location
    Sofia
    Posts
    1,349
    Play with httpd.conf settings - this seems the only way to tame the beast.
    :: :: :: :: :: ::
    :: VDSP.Net :: Directory of virtual and dedi serv providers by location and price

  20. #20
    Join Date
    Sep 2001
    Location
    Seattle, WA
    Posts
    3,084
    If your graphic is correct, aznd you're only using 100 MB, that's not bad at all. A server with plenty of ram will still use swap.
    Jim Reardon - jim/amusive.com

Posting Permissions

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