
Wordpress site running on Raspberry Pi - jstalin
http://pipress.vo3.net/?p=6
======
drzaiusapelord
Headers: W3 Total Cache/0.9.2.4

So he's serving a static page 90% of the time? I'd love to see how this thing
operates without a cache.

~~~
whalesalad
Running

    
    
        ab -n 1000 -c 20 http://pipress.vo3.net/wp-login.php\?action\=lostpassword
    

Seems to have killed it. The site came back when I killed the process.

Sorry jstalin but I had to do it! For science!

~~~
jacquesm
For science lots of people will probably try to replicate your results, as
good scientists should.

~~~
alpb
Haha, I liked this conversation! @jstalin I'll get my raspberry pi delivered
in a few days, I'll let you know if I can figure out the varnish issue.
Meanwhile, you can also submit a ticket on Trac <https://www.varnish-
cache.org/trac>

~~~
jacquesm
The quickest way to get an answer regarding varnish issues is to ask on the
irc channel.

irc://irc.linpro.no/#varnish

~~~
alpb
This seems like a permanent issue and should be reported as a bug rather than
an IM.

------
epitomix
I'm working on a project where I have a rails site running on a beaglebone, it
is populating its database with data coming from a usb device (~200 byte/s
continuous). I am finding that the SD card with all of the data and the OS
fails quite quickly (scale of weeks). Are SD cards just not up to the task?

~~~
ChuckMcM
Yes, SD cards are not designed as disks. 'SSD' drives work by selling you 4 -
10x the amount of flash as 'advertised' and replacing failed pages from the
excess over time. They are more like light bulbs than switches in that way
(finite lifetime).

~~~
epitomix
I figured as much, thanks for the input. It would be wise then for the OP to
make sure that noatime (turns off date accessed) is set in fstab for the
filesystem, you don't want to write to that SD card on every read.

~~~
jstalin
Thanks, that appears to be the default on the wheezy image they distribute.

------
wiredfool
Wow. Front page of Hacker News and it's still up. (granted, it's only been 19
minutes...)

~~~
NathanKP
Most people who have their site go down aren't using proper caching so their
Wordpress sites are evaluating the PHP and querying the MySQL database with
each page load. This is extremely wasteful of processor cycles and memory,
hence the site goes down when the server gets overloaded. The proper way to do
it is to have caching in place such that it evaluates once and saves the
result as a static HTML page. Then the static page can be served very quickly
and efficiently.

It looks like this is what he is doing. I'd be willing to bet the site will
stay up.

~~~
recuter
If it survives does that mean that the Pi can essentially saturate its network
connection if it doesn't need to do any "real" work? I bet you could stick it
in a rack in front of the grownup servers to act as a haproxy dongle, how
_hard_ can it _be_?

I officially dub it the cutest webserver.. in the _world_.

~~~
maratd
> Pi can essentially saturate its network connection

There are a few caveats here. If you're serving the same content ( < 512MB )
and it's static, then yeah, why not? Serving static content isn't CPU
intensive and you're serving directly from RAM.

~~~
sliverstorm
Let's not forget the caveat of network speed (4MB/s tops), and the other
caveat of alleged stability concerns when saturating the network link AKA USB
system.

------
JimWestergren
Nice. With Redis and a simple script I wrote I load WP in a few milliseconds:
[http://www.jimwestergren.com/wordpress-with-redis-as-a-
front...](http://www.jimwestergren.com/wordpress-with-redis-as-a-frontend-
cache/)

He should try it, as he is getting errors with Varnish.

~~~
lousy_sysadmin
I test your script and compare it on my LEB with my common setup.

\- OpenVZ 128MB RAM

\- Ubuntu

\- Nginx

\- MySQL

\- PHP-FPM

\- APC

\- Varnish -->> Redis

At 250user/second here's the result : <http://imgur.com/a/hPkyZ>

This is vanilla WordPress installation. There is almost no difference in load
time or overall resource usage as far as I'm concerned. I've never use Redis
before so thank you for this.

