Welcome to WebmasterWorld Guest from 62.210.77.51

Forum Moderators: phranque

Message Too Old, No Replies

Physical memory question

     
7:34 am on Feb 27, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Apr 19, 2003
posts:282
votes: 0


Hi I have recently got a VPS with 128M RAM. Currently I have only one site hosted on this VPS. It seems that sometimes it runs out of memory and gets crashed.
About the VPS: Linux 9, apache 1.3
About the site: 50000 daily hits, 200M bandwidth, mysql database.

free reslult:


total used free shared buffers cached
Mem: 123380 110764 12616 0 3636 45436
-/+ buffers/cache: 61692 61688
Swap: 262136 45820 216316


My question:

1) the total ram allocated to me is 123380, does this number represent 128M?
2) Why so much memory is used (110,764K) by the system (at the time of free command, there is almost no active process going on), while little is left for users?

Thank you for your thoughts.

newbies

10:00 am on Feb 29, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 10, 2004
posts:137
votes: 0


Hey Newbies,

Linux uses most of available memory all the time. Any extra memory is used by the filesystem cache. The cache in your free output is using 45 Megs, and buffers use around 3 megs, so in reality you have around 48 megs free.

Now don't go hogging all that extra memory because mysql relies heavily on the linux filesystem cache to increase speed.

50,000 hits per day is alot. Do you get traffic spikes? If you're trying to hit your web server and it's not there, it might be because your MaxClients setting is too low and there aren't enough Apache children to services all requests. What happens if you have say 20 apache children and you get 50 requests is that the operating system queues them until there's a spare apache child to handle the request. But that might take some time and cause a timeout. So try to analyse your logs and make sure you're not spiking beyond capacity.

regards,

Mark.