Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 28, 2010 3:05 pm 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
Hello,

I have a high traffic wordpress site called tekgoblin.com currently hosted at Mediatemple on their VE servers. It has 512m ram and no swap. Currently when I get slashdotted I can handle the traffic because its cached but I cannot run anything dynamic which is a problem.

I am asking whether or not the 712m vps offered by Linode will be able to handle the hits that I get which you can see at tekgoblin.com/mint.
If so maybe this forum and the beautiful users will be able to help me further optimize it when we cover CES in vegas next January.

Please let me know your opinions or any more information you may need from me.

reposted from a wrong category that I wrongly posted in.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 3:38 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Assuming I'm reading that right you're getting around 21k hits per 72 hours so 7k a day. I've a 512 getting more than that It's not running wordpress but that shouldn't make too much difference.

So yes a 512 (or 768 not sure which you want since there's no 712) will be able to handle it, the linode library has some guides on optimising apache/nginx/php/mysql. Also if you search the forums you'll find tons of posts on optimising wordpress.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 6:59 pm 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
Well today if you noticed I hit a peak of 2k hits an hour approximately which happens a couple times a month and I need the site to be able to take that. Gracefully


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 7:20 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
2k/hour = 2000/3600seconds= 0.56 hits/second

Not exactly "high traffic" in most books - but I guess it depends on what's being served (a 200k page or a 2G high def movie).

Only way to know for sure - spin up a Linode and see how it works for you.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 7:25 pm 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
Well it seems to bog down with 512m and apache spawns a ton of processes and eats the memory. Then I am unable to issue any commands or load anything dynamic.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 7:49 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
There are a lot of Apache tuning threads in the forum that are worth reading, but just as a simple first step, check that your MaxClients is reasonably low (start low, like 15-20) which most distributions are far above by default.

Lowering that limit can actually increase your performance rather than decrease by avoiding over-committing resources (particularly memory, which causes swapping which is terribly detrimental in the VPS environment).

You may still find performance too slow with the resources on a 512 depending on your application, but letting 50-100 apache processes start and guarantee that you massively swap is definitely going to kill your performance.

-- David


Top
   
PostPosted: Thu Oct 28, 2010 7:54 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
sanity wrote:
Hello,

I have a high traffic wordpress site called tekgoblin.com currently hosted at Mediatemple on their VE servers. It has 512m ram and no swap. Currently when I get slashdotted I can handle the traffic because its cached but I cannot run anything dynamic which is a problem.

I am asking whether or not the 712m vps offered by Linode will be able to handle the hits that I get which you can see at tekgoblin.com/mint.
If so maybe this forum and the beautiful users will be able to help me further optimize it when we cover CES in vegas next January.

Please let me know your opinions or any more information you may need from me.

reposted from a wrong category that I wrongly posted in.


Welcome to Linode! What's up!? I came from MT also.

Wow your traffic really picked up the last two days. Congrats! Nice blog by the way.

In my opinion, I don't think you'll have any problem with the basic $20 Linode. Your best month was 60,351 pageviews, no problem! Unless you're running some crazy-intensive plugins, I bet you could 5x your best month and not notice any difference.

Then again, I'm running Nginx. I actually have no experience with Apache so I can't really compare results for you.

In my experience with WordPress, the main bottleneck is MySQL. It takes up the most memory and most CPU time, by far.

One thing you can do is scatter some little PHP micro-timers throughout your theme to see where you're experiencing slowness with MySQL. I noticed Wordpress.com does this too. This is a good way to find problematic MySQL queries.

For example, I think WordPress has this problem where it doesn't "LIMIT" some selections. So if you have a lot of comments, you might save HOURS of CPU time just adding "LIMIT 50" (or however many comments per page you show) to the "SELECT" in wp-comments.php, or whatever the file is that shows comments.

I'm no longer afraid to hack the "core" of WP now, which is why I won't upgrade my main site to 3.0, LOL. Most of the new stuff they're adding now is cosmetic. Anyway, that's another rant, and I could always upgrade if I had to--just remember to redo the little tweaks here and there.

Anyway, if you get stuck, feel free to IM me on Skype: pjbrunet or email me: pj at pjbrunet.com

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 8:02 pm 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
Thank you for the message. Today I was unable to access the site for some time and unable to issue commands. Usually there are about 30 apache processes spawning and no ram when this happens and I am in the burstable ram up to 1GB. I shouldnt even be that high I really would like some suggestions on how to fix it if possible. I am not trying to leech I may still need to move to linode but I need a short term solution for now.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 8:33 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
sanity wrote:
Thank you for the message. Today I was unable to access the site for some time and unable to issue commands. Usually there are about 30 apache processes spawning and no ram when this happens and I am in the burstable ram up to 1GB. I shouldnt even be that high I really would like some suggestions on how to fix it if possible. I am not trying to leech I may still need to move to linode but I need a short term solution for now.


By the way, I don't use any "cache" plugins, all my content is dynamic and I do 8,000-10,000 pageviews per day like clockwork and my Linode barely notices. Like this month I never got above 20% CPU, typically peak around 15%. (Granted, a little bit slow for me this month, I'm working on it!) I don't think I'm using much memory either. By my rudimentary calculations, I'll hit Linode's bandwidth limit (which is generous) before I need to think about a second Linode or further tweaking of my database.

I wrote a little blog post showing the microtimer trick (at the bottom) http://wp-fun.co.uk/2010/10/28/performa ... crotimers/

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 9:03 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
sanity wrote:
I am in the burstable ram up to 1GB.

Burstable RAM? Does MT use Virtuozzo/OpenVZ?

Well, welcome to Xen land. Memory works completely differently here. Your mileage may vary, but I generally find that 512MB in Xen is actually a lot more RAM than 512MB in Virtuozzo/OpenVZ.

A few thousand page views per hour is definitely doable on a Linode 512 if you use a good caching plugin for WordPress. It seems you're already using WP Total Cache, so you're all good.

If you're expecting a super traffic spike, you could also upgrade just for a few days and downgrade after the waves have passed.


Top
   
 Post subject:
PostPosted: Thu Oct 28, 2010 10:34 pm 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
Sounds like it will be fun, and its Virtuozzo. The problem for me is its very hard to move the site and keep minimal downtime. I am a student and work full time as well.


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2010 2:43 am 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
sanity wrote:
The problem for me is its very hard to move the site and keep minimal downtime. I am a student and work full time as well.


I don't know why you would have downtime, unless you cancel your MT account before your Linode is ready for traffic. Or maybe if you're using MT as your registrar too?

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2010 9:57 am 
Offline
Senior Newbie

Joined: Sat Jun 21, 2008 5:17 pm
Posts: 6
Website: http://myspace.com/djmicron
hello,
when using wordpress you should be aware of some bad developed plugins as the cause of performance issues.
I have had a big performance problem using a plugin called wpomatic to import rss feeds from external sites and even on a dedicated server with 4 GB of ram i was forced to reboot more than one time a day due to memory limit reached and no Apache fine tuning solved the issue.
Then i removed the plugin and developed my own php script and it's fine on a Linode 512 vps.
So it would be interesting to see a list of your installed wordpress plugins and discover if some of them is causing your problems or if it is just related to Virtuozzo that shares server resources with other customers.
Moving your wp site to linode is very simple, just backup your database and your wordpress installation, then you can use stack scripts to install a ready to use lamp to your Linode vps, import the mysql backup, import the wordpress installation backup, check that paths, mysql database name, username and password are ok inside the wordpress configuration file, set your domain name inside linode dns manager and when all is ok, change the dns settings from your domain control panel.


Top
   
 Post subject:
PostPosted: Sat Oct 30, 2010 5:23 am 
Offline
Senior Newbie

Joined: Thu Oct 28, 2010 2:59 pm
Posts: 19
This is what happens when testing the site with loadimpact.com


Last login: Fri Oct 29 12:16:15 on console
top - 04:20:19 up 1 day, 18:23, 1 user, load average: 0.09, 0.49, 0.36
Tasks: 18 total, 1 running, 17 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 946344k total, 278976k used, 667368k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22234 mysql 15 0 279m 60m 5092 S 0.0 6.6 13:37.22 mysqld
25846 apache 15 0 270m 45m 3496 S 0.0 5.0 0:03.62 httpd
32049 apache 18 0 270m 45m 3480 S 0.0 4.9 0:01.47 httpd
26380 root 15 0 77388 14m 1660 S 0.0 1.5 0:00.25 miniserv.pl
15624 root 18 0 232m 9.9m 5868 S 0.0 1.1 1:01.76 httpd
5288 root 15 0 86064 3436 2660 S 0.0 0.4 0:00.02 sshd
25839 postfix 18 0 117m 2508 1876 S 0.0 0.3 0:00.04 qmgr
25816 root 15 0 54152 2312 1788 S 0.0 0.2 0:00.19 master
3238 postfix 15 0 54216 2288 1788 S 0.0 0.2 0:00.00 pickup
18244 root 18 0 12068 1728 1288 S 0.0 0.2 0:00.02 bash
25886 nobody 18 0 51528 1608 620 S 0.0 0.2 0:00.28 proftpd
22011 root 19 0 11932 1424 1184 S 0.0 0.2 0:00.01 mysqld_safe
21960 root 18 0 62628 1208 648 S 0.0 0.1 0:00.32 sshd
21763 root 15 0 12612 1192 928 R 0.3 0.1 0:00.09 top
25923 root 15 0 20872 1180 588 S 0.0 0.1 0:00.06 crond
1 root 15 0 10352 740 620 S 0.0 0.1 0:01.67 init
19534 root 19 -4 12608 680 360 S 0.0 0.1 0:00.00 udevd
21914 root 15 0 5912 624 500 S 0.0 0.1 0:00.14 syslogd














top - 04:22:07 up 1 day, 18:25, 1 user, load average: 0.11, 0.36, 0.32
top - 04:22:32 up 1 day, 18:25, 1 user, load average: 0.21, 0.37, 0.33
Tasks: 49 total, 1 running, 47 sleeping, 0 stopped, 1 zombie
Cpu(s): 2.7%us, 0.5%sy, 0.0%ni, 96.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 946344k total, 946344k used, 0k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23891 apache 15 0 298m 45m 3320 S 18.0 4.9 0:00.57 httpd
23911 apache 15 0 305m 43m 3312 S 15.7 4.7 0:00.49 httpd
9769 apache 15 0 270m 45m 3324 S 13.7 4.9 0:02.28 httpd
22234 mysql 18 0 279m 60m 5092 S 0.7 6.5 13:37.66 mysqld
12136 apache 15 0 232m 7180 2472 S 0.3 0.8 0:00.08 httpd
20443 apache 15 0 296m 21m 3060 S 0.3 2.4 0:00.22 httpd
26593 apache 15 0 0 0 0 Z 0.3 0.0 0:00.02 httpd <defunct>
26618 apache 15 0 232m 6940 2336 S 0.3 0.7 0:00.02 httpd
1 root 15 0 10352 740 620 S 0.0 0.1 0:01.67 init
3238 postfix 18 0 54216 2288 1788 S 0.0 0.2 0:00.00 pickup
3565 apache 15 0 265m 40m 3300 S 0.0 4.4 0:00.64 httpd
3566 apache 15 0 265m 40m 3312 S 0.0 4.4 0:00.56 httpd
5288 root 18 0 86064 3436 2660 S 0.0 0.4 0:00.04 sshd
6078 apache 15 0 268m 43m 3300 S 0.0 4.7 0:02.02 httpd
9765 apache 15 0 265m 40m 3304 S 0.0 4.4 0:00.56 httpd
12115 apache 15 0 329m 40m 3268 S 0.0 4.4 0:01.84 httpd
12122 apache 15 0 265m 40m 3316 S 0.0 4.4 0:00.60 httpd
12157 apache 15 0 265m 40m 3268 S 0.0 4.4 0:00.53 httpd
12168 apache 18 0 274m 49m 3852 S 0.0 5.4 0:02.40 httpd
15624 root 15 0 232m 9.9m 5868 S 0.0 1.1 1:01.85 httpd
15902 apache 15 0 307m 35m 3272 S 0.0 3.8 0:00.38 httpd
18071 apache 15 0 232m 7116 2480 S 0.0 0.8 0:00.02 httpd
18075 apache 15 0 265m 40m 3272 S 0.0 4.4 0:00.50 httpd
18244 root 18 0 12068 1728 1288 S 0.0 0.2 0:00.02 bash
19534 root 19 -4 12608 680 360 S 0.0 0.1 0:00.00 udevd
20428 apache 15 0 273m 49m 3836 S 0.0 5.3 0:01.73 httpd
21914 root 15 0 5912 624 500 S 0.0 0.1 0:00.14 syslogd
21960 root 18 0 62628 1208 648 S 0.0 0.1 0:00.32 sshd
22011 root 19 0 11932 1424 1184 S 0.0 0.2 0:00.01 mysqld_safe
23879 apache 15 0 329m 45m 3308 S 0.0 4.9 0:00.87 httpd
23896 apache 15 0 232m 5720 1220 S 0.0 0.6 0:00.01 httpd
23905 apache 15 0 308m 32m 3292 S 0.0 3.5 0:00.40 httpd
23908 apache 15 0 232m 6960 2340 S 0.0 0.7 0:00.01 httpd
23915 apache 15 0 232m 6988 2352 S 0.0 0.7 0:00.03 httpd
23919 apache 15 0 265m 40m 3268 S 0.0 4.4 0:00.50 httpd
25816 root 15 0 54152 2312 1788 S 0.0 0.2 0:00.19 master
25839 postfix 18 0 117m 2508 1876 S 0.0 0.3 0:00.04 qmgr
25886 nobody 15 0 51528 1608 620 S 0.0 0.2 0:00.28 proftpd
25923 root 15 0 20872 1180 588 S 0.0 0.1 0:00.06 crond
26380 root 15 0 77388 14m 1660 S 0.0 1.5 0:00.25 miniserv.pl
26577 apache 15 0 265m 40m 3276 S 0.0 4.4 0:00.48 httpd
26589 apache 15 0 232m 5728 1224 S 0.0 0.6 0:00.01 httpd
26600 apache 15 0 265m 40m 3264 S 0.0 4.4 0:00.53 httpd
26602 apache 15 0 296m 19m 3016 S 0.0 2.1 0:00.18 httpd
26606 apache 15 0 234m 8952 2940 S 0.0 0.9 0:00.05 httpd
26609 apache 15 0 232m 5736 1232 S 0.0 0.6 0:00.01 httpd
26614 apache 15 0 232m 5724 1220 S 0.0 0.6 0:00.01 httpd


Top
   
 Post subject:
PostPosted: Sat Oct 30, 2010 8:01 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Your MaxClients in Apache's conf should be lower than it is now. Turning off (or reducing the timeout of) Keepalives might be a good idea, too.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: fede and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group