abazoskib Posted July 28, 2009 Share Posted July 28, 2009 when i run free -m i get: total used free shared buffers cached Mem: 1746 1286 460 0 162 853 -/+ buffers/cache: 270 1475 Swap: 895 0 895 I feel like the system has been lagging ever since I changed my apache configuration. Here are my settings: Apache StartServers 20 MinSpareServers 30 MaxSpareServers 80 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 PHP max_execution_time = 90 ; Maximum execution time of each script, in seconds max_input_time = 240 ; Maximum amount of time each script may spend parsing request data memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) MYSQL key_buffer_size,268435456 max_allowed_packet,33554432 max_binlog_cache_size,4294967295 max_binlog_size,1073741824 max_connect_errors,10 max_connections,4000 query_alloc_block_size,8192 query_cache_limit,1048576 query_cache_min_res_unit,4096 query_cache_size,0 query_cache_type,ON How can I improve my configuration for performance? I am doing lots of db intensive work, mostly PHP scripting, running a SOAP server, and lots of PHP/curl data transmissions. Getting lots of traffic on the SOAP server per day. Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/ Share on other sites More sharing options...
corbin Posted July 29, 2009 Share Posted July 29, 2009 How many requests per second do you get? Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-885620 Share on other sites More sharing options...
abazoskib Posted July 29, 2009 Author Share Posted July 29, 2009 its a constant incoming data feed all day. this particular server gets data from two separate websites in terms of passing data from a form(~5000 records) and a batch of close to 100,000 records per day from ftp which get imported from a few CSV files every day. The server also sends the same (~5000) records to another source through PHP/curl after each record has been cleaned and processed by the server. I might have been a little too generous with the Apache settings, but I am not an expert server admin. Just looking for different opinions in order to avoid my own paranoia and biases. Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-885632 Share on other sites More sharing options...
steviewdr Posted July 29, 2009 Share Posted July 29, 2009 How much memory do you have on your server? Typically you adjust your apache settings to that. What does "free" look like after a few days? Does the server use much swap space? -steve Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-885845 Share on other sites More sharing options...
abazoskib Posted July 29, 2009 Author Share Posted July 29, 2009 havent used swap ever i believe. this is today's status: total used free shared buffers cached Mem: 1746 1321 425 0 162 866 -/+ buffers/cache: 292 1454 Swap: 895 0 895 Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-885878 Share on other sites More sharing options...
steviewdr Posted July 30, 2009 Share Posted July 30, 2009 So you have 1.7GB of ram? I missed that before. I'm using the following settings on a server with 4gb ram which gets 1-2 million hits a week, and 90+gb traffic a week: StartServers 8 MinSpareServers 5 MaxSpareServers 20 MaxClients 256 MaxRequestsPerChild 1000 I suggest you install "munin" to monitor your server. It will tell you your cpu and memory usage, and if there are any iowait issues. -steve Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-886644 Share on other sites More sharing options...
MyUser Posted August 7, 2009 Share Posted August 7, 2009 As alternative you could install nginx to serve static content. This will improve performance Quote Link to comment https://forums.phpfreaks.com/topic/167868-memory-management/#findComment-893062 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.