fixed import form wordpress plugin
[homepage.git] / src / _posts / 2016-02-10-light-in-realraum-is-now-faster.html
diff --git a/src/_posts/2016-02-10-light-in-realraum-is-now-faster.html b/src/_posts/2016-02-10-light-in-realraum-is-now-faster.html
deleted file mode 100644 (file)
index 2f9b9ec..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-layout: post
-status: publish
-published: true
-title: Light in realraum is now faster
-author:
-  display_name: xro
-  login: xro
-  email: xro@realraum.at
-  url: ''
-author_login: xro
-author_email: xro@realraum.at
-wordpress_id: 474
-wordpress_url: http://wp.realraum.at/?p=474
-date: '2016-02-10 06:28:54 -0600'
-date_gmt: '2016-02-10 05:28:54 -0600'
-categories:
-- Projekte
-- english
-tags: []
-comments: []
----
-<p><a href="http://licht.realraum.at" title="licht.realraum.at">licht.realraum.at</a>, went FTLw today. That is... it became much Faster Than Last week. :-)</p>
-<p>Since the Raspbian image upgrade and move to a bigger (but slower) SDcard, licht.realraum.at had become truly sluggish. To the point that pressing a button to turn on the light or change the stereo volume could take up to 6 seconds until something happened. (Obviously we disabled the swap-file long ago.)</p>
-<p>The problem was quickly identified. Processes don't load quickly enough.<br />
-The fact that the whole systems was a dunghill of bashscript cgi-scripts and python helper scripts also did not help. At all.</p>
-<p><strong>First attempt</strong> to rectify this: rewrite the python helper rf433ctl.py. Formerly it was a simple script that would be called by the cgi-script and send the appropriate bytes down to the teensy.<br />
-Each call to it, however now took forever. So. I rewrote it as a daemon that would constantly stay in memory and be nudged by other instances of it via RPC. The idea being, if it's already completely in memory, loading a second instance should be faster. Right? Wrong!. Unfortunately that did not work out at all.</p>
-<p><strong>Second attempt </strong>to rectify this: Remove the kiosk functionality and thus memory-hog midori from licht. Thankfully a very nice person gifted us a RaspberryPi per (almost) anonymous letter, so we had the necessary hardware on-hand to split the functionality onto two separate boxes: <a href="http://licht.realraum.at" title="licht.realraum.at"><code>licht.realraum.at</code></a> and <code>smallkiosk.realraum.at</code><br />
-Unfortunately, even freeing up 60% of memory did not even put a dent into the problem.</p>
-<p>So.. <strong>third and last attempt</strong>. Hit it with go ;-> In a 3 hour session, I rewrote the whole dunghill as a <a href="https://github.com/realraum/deckenlichtschalter/tree/master/linux/golightctrl">monolithic golang daemon/webserver/tty-handler</a> which, once loaded, always stays in memory. Then I got rid of lighthttpd and the python scripts. Result... Speedup from 6s to <=0.05s !!</p>
-<p>Should have done this right away really...</p>