We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Optimization Tips | Forum

Topic location: Forum home » Support » General Questions
Mark
Mark Apr 14 '12
Hopefully below we can encourage members and oxwall users to share optimization tips and tricks.


Currently i am on a VPS that has 2gb ram, with a bunch of cache modules installed including xcache (you could also use APC or eaccelerator), gzip/deflate enabled, and output buffering on.


Below is the config I currently use and over the past week I have averaged a load average of 1.39 and memory usage average of 1.3GB.


my.cnf

[mysqld]
query_cache_type=1
query_cache_limit=3M
query_cache_size=256M
max_connections=80
wait_timeout=150
table_cache=256M
tmp_table_size=128M
max_heap_table_size=128M
thread_cache=160M
sort_buffer_size=512K
read_buffer_size=512K
read_rnd_buffer_size=3M
myisam_sort_buffer_size=128M
max_allowed_packet=5M

http/apache settings

HostnameLookups off
TraceEnable Off
FileETag None
StartServers 2

MinSpareServers 3
MaxSpareServers 5

ServerLimit 150
MaxRequestsPerChild 5000

KeepAlive On
KeepAliveTimeout 1

Mark
Mark Apr 14 '12
Some useful links


http://www.omh.cc/mycnf/ - Measures how much memory (RAM) your current my.cnf will use.


http://www.webpagetest.org/ - A good place to get an overview of how quickly your website loads.


http://www.websiteoptimization.com/services/analyze/ - Another good place to get page loading optimization tips and information.

Den Team
Den Apr 23 '12
Topic was moved from Core.
Michael I.
Michael I. May 13 '12
Thank you for sharing useful information, Mark!
Mark
Mark May 22 '12
just an update - my site receives about 10k unique visits a month, and with the above settings enabled and some internal oxwall optimisation (which I hope to post about soon) I have only have two instances of the site going over a load of 5 (one was for an apache re-build) with an average load of 0.45.



Joseph
Joseph May 22 '12
where do you check and configure the http/apache
Mark
Mark May 22 '12
its usually in a file called httpd.conf


mine is located


/etc/conf/httpd.conf


If using WHM a lot of the settings can be configured via there.


I use a script called Munin to monitor these services and provide logs like the above for load average