1

I'd like to know how to make it faster. Just for the plain fun because of course there are caching solutions which make websites fly on every system, but it'd be cool to get the most out of non-cached performance as well.

I thought about installing HipHop php (hhvm), but don't know what I am up to. I see mostly negative comments when Googling.

Maybe just tuning Apache and mysql will do. And I think the slowness comes mostly from the slow disk and memory performance.

twicejr
  • 1,319
  • 3
  • 13
  • 21

3 Answers3

1

Not really an answer, but I have a Pi as my home server and found it was quite slow. It takes 0.3 - 0.5 seconds to render a page. Which is slow! Sometimes I get up to 3 seconds on rare occasions.

I have done a fair bit of testing and got nowhere, so I can confirm the following doesn't help:

  • Gigabit router with cat6 cable, no difference, the pi is only 100mb which is a shame.
  • 95mb/s SD card, didn't seem to make a difference
  • Overclocked to 1ghz, used heatsinks and a fan, no difference...

So the best solution is to not use a pi for a production server. Use it only for a local development server if you don't mind the page loading speeds.

Adam
  • 1,957
  • 3
  • 27
  • 56
  • 1
    I'd like to add that it is a great tool to test webpages for speed hickups :) – twicejr Aug 14 '14 at 22:39
  • @Adam Local laptop / pc can be used as development server. I don't understasnd the point using pi as a development server. – Bhavesh G Aug 02 '16 at 04:29
  • @BhaveshGangani this was a while ago, I don't use the Pi anymore! I use docker on local. – Adam Aug 02 '16 at 07:41
0

To get quicker load times on the raspberry pi, what I've found helps is to use a lighter weight webserver. What I've used in place of apache is nginx. I hear monkey is even better, however they don't yet have a release arm build.

Here are some numbers. http://raspberrywebserver.com/raspberrypicluster/comparing-the-performance-of-nginx-and-apache-web-servers.html

Additionally I've used mongodb instead of MySQL because of it being quicker for more specific use cases. I'm certain that it isn't always the solution to go with however, as it radically changes how you would store your data and makes multi table relational queries a pain. MySQL vs MongoDB 1000 reads

Finally make sure you have a fast SD card, and you can turn on a swap file or swap partition to help with only having 512 megs of memory (model b).

Of course if you are using the pi to develop for a specific environment you may not have any of those options. But if you want to use it for a personal web server or have more freedom with the production environment, that's the route I'd check into.

Community
  • 1
  • 1
vipero07
  • 1,022
  • 1
  • 10
  • 16
  • what version of mongodb did you use? – Phill Pafford Jul 30 '14 at 14:40
  • @PhillPafford since the pi is an arm processor I'm using an old version of mongo, specifically the one in this guide http://c-mobberley.com/wordpress/2013/10/14/raspberry-pi-mongodb-installation-the-working-guide/ i looked for more recent arm versions but the other ones i came across are the same mongodb revision. I read somewhere that mongodb themselves will have an arm compatible version soon enough. – vipero07 Jul 30 '14 at 18:36
0

Use MYISAM instead of INNODB on Raspberry PI if you can. You will see some differences in speed.

akadi81
  • 39
  • 1