Hi there, I am currently trying to troubleshoot some performance issues I am having with my site, namely MySQL issues.
My website is http://www.gooverseas.com. It is currently in the test phase but feel free to go take a look. One thing you might notice is the slow initial load times. It varies but sometimes it can take between 3 to 12 seconds to load a single page. Before the site goes live I need to configure my server to consistently serve fast and stable load times.
Through my own testing and analysis I think the problem is mainly related to memory. I have plenty of bandwidth and my CPU consumption is low. This leaves memory.
The Facts:
I am currently running on SliceHost with 256MB of dedicated memory and 512MB of swap. Using the free -m command line I currently see this:
total used free shared buffers cached
Mem: 256 238 17 0 1 53
-/+ buffers/cache: 183 72
Swap: 511 47 464
On other days though I have seen even less free memory and more swap being used.
I have put a lot of effort into configuring my server settings to get the most of out my resources. I have edited my my.cnf file settings to look like this:
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
My apache.conf Settings:
Timeout 45
KeepAlive On
KeepAliveTimeout 10
MaxKeepAliveRequests 200
StartServers 5
MinSpareServers 10
MaxSpareServers 20
MaxClients 75
MaxRequestsPerChild 2500
Within Drupal I have enabled all caching features under the Performance menu.
Other things to consider: I am also in the process of installing Boost, Authcache and Cache Router to improve caching performance. Are there any other modules I should consider installing?
Thanks for taking a look and offering any comments you have. The issue might be simple needed more memory, but I also want to be sure that I am getting the most out of my resources before I do so.
Thanks again!
Comments
As you have known the issue
As you have known the issue is related to memory, why not add more memory to it? 256M memory in a dedicated server for Drupal is really a low configuration.
I arrived here searching for
I arrived here searching for the same solution. What are optimal settings for mysql when limited to 256mb of RAM? Guess I'll continue my search but offer the following before heading off.
The more caching you employ the less cache is available. Caching tools are great but can quickly lead to diminishing returns. If not careful mysql will be in a constant battle with php over available cache. It's a fine line to be sure.
I'll be watching for tried and proven tips. offerings, etc. Meanwhile I'm watching top and mem is digging into swap again :(
Seems the REAL solution is somewhere around four nodes, for my host that equals 1024MB memory. Four times the money I want to spend every month, but what to do? I'm not going back to shared hosting.
I found a post with
I found a post with recommendations for optimizing one node, alas. Be sure to make backups of your apache.conf and my.cnf in case things don't work out so well. Modify as needed (file paths, etc.).
Apache Config.
MySQL Config.
I've only started monitoring these settings and haven't gathered enough data yet to see if they help.
Any feedback is surely welcome!
Jerry