WebFaction
Community site: login faq

I've been paying quite lot of attention to the performance of my main WP site lately. I've implemented caching with WP Super Cache, tried CloudFlare and now I'm running on MaxCDN. Still performance could see some improvement.

I've found this post[1] where it is suggested the option that one load-balances the site among two hosts or that it runs its own Apache / nginx PHP stack. Is this suggestion still valid given the recent changes in Webfaction's PHP stack? What's the suggested way to squeeze every bit of performance out of the shared plans? Would moving to a bigger plan help or could it potentially make it worse (as people needing a bigger plan probably have busier sites and make for a worse neighbour than the people on the smaller plans)?

[1] http://community.webfaction.com/questions/1692/webfaction-shared-hosting-performance

asked 16 Apr '13, 16:37

L De Leo
26410
accept rate: 0%


With respect to load-balancing across a few plans, yes this is still a valid approach, but it really is intended to increase the capacity of your website (more simultaneous users) than it is intended to improve the response time of any single request.

With respect to performance on your existing server, the first thing to ensure is that you are using a 64-bit CentOS 6 server and not an older 32-bit CentOS 5 server. The newer servers employ cgroups to help improve resource isolation. If you are on a CentOS 5 server, you will want to migrate to a newer machine.

If you are on a CentOS 6 server, then you have the benefits of cgroups isolation at your disposal, but you are not necessarily making use of the features. The next step would be to ensure that you are using a private mysql instance. It works like this:

  • Under cgroups (active on all CentOS 6 servers), all users get equal priority to system resources
  • Mysql is one user on the machine, under which the system-wide mysql instance runs
  • Your queries under the system-wide mysql would be competing with the other queries for mysql's resource space
  • By having a private database, the db runs under your user instead of 'mysql', so you get as many resources for your private mysql as the shared mysql gets, total.
  • Unlike previously, higher database usage by other users cannot choke your private instance
  • You are not limited to 30 simultaneous connections, as the private mysql instance has no connection limit

Finally, with respect to upgrading to one of the larger shared hosting plans, yes there is typically a benefit to doing so. We still police these servers to ensure that one user doesn't overconsume too many resources (and if you notice this happening, be sure to let us know), and you still will want to use a private MySQL instance as described above. However, we strictly limit the number of users on these machines, so generally the experience will be better as there will be lower load overall. It's definitely the case that the highest load averages are on our smallest shared hosting plan servers (the 256MB plan servers).

Hope that helps!

permanent link

answered 16 Apr '13, 20:54

ryans ♦♦
5.0k93260
accept rate: 43%

Thanks Ryan super answer! Missed the MySQL private instance thing.

(17 Apr '13, 04:18) L De Leo
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×26

question asked: 16 Apr '13, 16:37

question was seen: 2,178 times

last updated: 17 Apr '13, 04:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM