I have a fairly small forum, usually only 10-20 members/guests online at a time. But the past few days, the server load goes up to about 5-10 until I restart apache. Anything I can do to lower server load? I have since increased the timeout between searches from 15s to 20s. Also changed the search results from 500 to 300. Anything else I can do? Also, how effective will it be to upgrade server ram from 512mb to 1gb?
Sheesh, I would definitely upgrade your ram. Really though, with only 10-20 online at once, you shouldn't have too much of a problem...but yes, upgrade your ram. Sounds like you run your own server...why not go with paid hosting elsewhere? You could get a solid account for $5/month and not have to worry about server load with that traffic.
Agreed, you can never have enough ram. What are the specs of your server? there are plenty of tweaks you can do to optimize your server - mysql, apache, php caching, etc...
Try to optimze Apache and mySQL. For Apache, the best I've found is... Timeout 50 KeepAlive On MaxKeepAliveRequests 120 KeepAliveTimeout 10 StartServers 16 MinSpareServers 10 MaxSpareServers 20 MaxClients 125 MaxRequestsPerChild 5000
I should have mentioned I run a bunch of sites on this server, but the vbulletin one is the only cpu intensive one. The traffic is fairly high though, usually around 5-6 mbps.
I am using direct admin and this is what it lists for each site. # Auto generated apache config file by DirectAdmin version 1.23.1 # Modifying this file is not recommended as any changes you make will be # overwritten when the user makes any changes to his/her website # Frontpage requires these parameters in every httpd.conf file or else # it won't work. Port 80 ServerRoot /etc/httpd <VirtualHost xx.xxx.xx.xxx> ServerName www.domain.com ServerAlias www.domain.com domain.com ServerAdmin DocumentRoot /home/admin/domains/domain.com/public_html ScriptAlias /cgi-bin/ /home/admin/domains/domain.com/public_html/cgi-bin/ UseCanonicalName OFF User admin Group admin CustomLog /var/log/httpd/domains/domain.com.bytes bytes CustomLog /var/log/httpd/domains/domain.com.log combined ErrorLog /var/log/httpd/domains/domain.com.error.log <Directory /home/admin/domains/domain.com/public_html> Options +Includes -Indexes php_admin_flag engine ON php_admin_flag safe_mode OFF php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f ' </Directory> #php_admin_value open_basedir /home/admin/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/ </VirtualHost>
There should be one config file that covers the whole server. You don't need to touch the site files. su root Once you find where the file is for the whole server, go to that directory, cd /path_to_directory/ something like cd /etc/httpd/conf/ then pico httpd.conf Edit the file, save and close it, then restart apache. BUT, do one thing wrong, and all the domains crash until you fix it. Just pressing return in the wrong place while editing the file can crash it!!!
After you have saved the httd.conf file, run /usr/local/apache/bin/apachectl configtest Code (markup): This will check to make sure the syntax is okay. If it is, then most likely you edited the file okay You should post up your my.cnf file which is the mysql config file
No idea what I'm supposed to do. Am I supposed to do this through root? Or can I do it through Direct Admin?
I would increase RAM too. 512Mb isnt too much and especially with you running other sites on the box too. In vBulletin there are a number of other options in the huge options list that talk about performance problems if you run a busy board. 20 online is not busy, but with that low amount of RAM it would be busy for that particular server... so go through the other options and see what others can be switched on or off.
See this article: Optimizing Your vBulletin Forum To Run Faster It may help you. The article talks about things you can do as far as your vBulletin forum setup to reduce server load. -
Thanks for the article, very helpful. I think the best change was the gzip one, I had no idea about that since vbulletin recommends 1.