WebFaction
Community site: login faq
1
2

Hello. I've been using webfaction for a few client sites for a couple of years now. One app is taking off now and the sometimes poor performance is becoming an issue.

I should be clear that traffic is still low, generally no more than a couple of concurrent users at a time. But at times the page load time is very high, 2 seconds plus, which due to the nature of the app can make it almost unusable.

I'm not claiming that my app is optimised, but I have tested it on other stacks and seen dramatically better performance.

Is there something relating to the hosting that can be done to improve the performance? I understand from reading other posts that, because it is a PHP app, buying more memory will not make a differrnce. Or is this just an inevitable consequence of a shared hosting account? Do I need a vps with some guaranteed resources?

Cheers, Pete.

asked 24 Jan '11, 18:46

kippertoffee
2625
accept rate: 0%

We've got similar issues occasionally with a php/mysql application. Not optimized, but generally performs reasonably in serving a handful of users simultaneously. We've gone through periods where a mysql query which is taking too long is killed by a Webfaction monitor app once every 3-4 days, and the response time is awfully slow, and then everything is fine. It would be useful to have a tool that would separate the issues we're responsible for from those that come from shared hosting. It would be great - and worth extra fees - for a solution that promised higher performance, as we needed it.

(24 Jan '11, 22:10) cesnn

Hi Pete,

I do see that you have been with us for a while! You are on one of our older servers at the moment. To put it in perspective we are now up to Web178, you know which server you are on so you can see the difference in machine number. The specs have been increasing as well. The server you are on has 2 cores in the processor the newest machines have 8 cores.

If you don't mind my asking, what other stacks have you tested it on?

Purchasing more RAM won't directly make your app faster but you an install your own apache or nginx server and serve your app from that making it faster because the apache/nginx process is completely dedicated to your application vs. the per user apache that is in use server wide. (On the newer servers the way PHP is setup is completely different than the way it is set up on the older servers.)

Some things that can always be done to improve speed are:

  • Caching
  • Optimizing SQL queries
  • Using a CDN to distribute media

It's not inevitable, shared hosting has its faults but "slowness" usually isn't one of them. In my own non-scientific tests I was barely able to run 2 large Django sites + Postgres on a 256MB VPS. The I/O wait was through the roof and the CPU was at 100% usage for the 5 hours that I monitored it. Those same 2 sites + 6 other Django sites, 3 Static/CGI/PHP sites, and 2 Static only apps all ran fine on WebFaction's servers even with the other users using the machine at the same time. Since our servers are "bare metal" their performance is drastically better than you could get with a VPS at the same specs.

For about the same price of a decent VPS ($30/month), you could purchase three Shared plans on our servers and load-balance between them. So that's triple the processing power, CPU, and disk space, in addition to the increased memory. If your application doesn't use more RAM then the excess RAM you may get from the VPS won't really help you.

We've just announced a new plan that will give you 90GB more disk space for the same price as our old Shared 1 plan, but that plan is only available on Web173+ so you would need to migrate your data to a new machine that has the 8 core processor I mentioned.

If you'd like to move to a new machine all you need to do is submit a ticket and we'll get the server added so you can migrate your data.

permanent link

answered 25 Jan '11, 01:38

klynton
1.6k129
accept rate: 42%

edited 25 Jan '11, 01:47

Thanks a lot for the very clear answer klynton. I think I will migrate first, then try my own Apache/PHP install, then, if needed, multiple accounts with load balancing.

Cheers, Pete.

(25 Jan '11, 18:46) kippertoffee

Hi Pete,

You are very welcome! I'm glad I could answer your question. :)

(25 Jan '11, 18:50) klynton
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:

×262
×26

question asked: 24 Jan '11, 18:46

question was seen: 5,375 times

last updated: 02 Mar '11, 09:22

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