I am on an vps hosting with 512 MB Ram , the problem i am facing is that when 80 clients land on my site Apache becomes non responding , Since 80 is the limit i kept in Preform setting for servers/client. If i increase them very much my site goes slow , so whats the limit i should keep for Max Clients /servers so everthing works perfectly well .?? Thanks.
Log into to your server using ssh and run this command to find out how much memory apache is using. Run it at a time when there is some decent traffic hitting your sites: ps -ylChttpd --sort=rss |less Code (markup): The RSS column tells you how much memory apache is using (in KB - divide by 1024 to find the amount in MB). Find the largest amount used by a single apache process. Then calculate like (512MB-memory for other processes)/max apache process size. You can also try and divide by average apache process size. That should give a reasonable max clients figure.
well if found 38 httpd were running and maximum RSS was 22,000 , does RSS means same as memory useage ?? thanks
RSS (Resident Set Size) - The portion of a process that exists in physical memory (RAM). The rest of the program exists in swap. If the computer has not used swap, this number will be equal to VSIZE. source http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html I'd like to add that I think 80 is a good number for your VPS. If you were to divide 512MB/22MB you'd get 23 as a max clients value which is far too low. I think its better if you find the average RSS size for your apache processes. You can do this by copy pasting the output of the command I gave you into an Excel worksheet and then using the text to columns command under the data menu to separate the columns. A simple avg function on the RSS column would then give you the number you want.
It depends more of on what kind of data you've stored. If you are putting media files then it can be problem, as many connections per used by single IP. Moreover, usually with 512 RAM VPS I set around 384 Max Clients and you can try keeping KeepAlive OFF. Maybe that decreases the RAM usage and increases the performance.