{"id":419,"date":"2013-12-21T11:26:42","date_gmt":"2013-12-21T16:26:42","guid":{"rendered":"https:\/\/devolve.net\/blog\/?p=419"},"modified":"2018-07-13T11:25:18","modified_gmt":"2018-07-13T15:25:18","slug":"faster-webserver-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.devolve.local\/faster-webserver-raspberry-pi\/","title":{"rendered":"Faster webserver on Raspberry Pi"},"content":{"rendered":"

The Raspberry Pi<\/a> has a 32-bit ARM CPU running at 700MHz by default, although you can usually overclock them somewhat and still enjoy stable behavior. I’m running Raspbian<\/a>, a Debian<\/a>-based distribution built for the Pi.<\/p>\n

One thing that’s mildly annoying is that running WordPress on the Pi using Nginx<\/a> and php-fpm has been dog slow, more so than just due to the relatively low clock speed of the CPU. I finally figured out why. I noticed some entries showing up in the Nginx virtual host error log: an upstream response is buffered to a temporary file \/var\/lib\/nginx\/fastcgi\/3\/07\/0000000073 while reading upstream<\/code>. The responses from PHP were being buffered to disk (in this case, an SD card which is the boot device). I googled and found the option<\/a> I needed to set. Once that was set to 0<\/code> and Nginx was restarted, I immediately noticed an improvement in the response time.<\/p>\n

Before finding this, I’d tried setting various things in W3 Total Cache plugin for WordPress that didn’t make much of difference. Now some of these caching options produce a noticeable boost in performance in addition to the bump from avoiding disk buffering. Needless to say, I’m much happier with the performance.<\/p>\n","protected":false},"excerpt":{"rendered":"

The Raspberry Pi has a 32-bit ARM CPU running at 700MHz by default, although you can usually overclock them somewhat and still enjoy stable behavior. I’m running Raspbian, a Debian-based distribution built for the Pi. One thing that’s mildly annoying is that running WordPress on the Pi using Nginx and php-fpm has been dog slow, […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[34,25],"_links":{"self":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/419"}],"collection":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":4,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":444,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/419\/revisions\/444"}],"wp:attachment":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}