-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·79 lines (61 loc) · 5.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>nanoplone by polyester</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>nanoplone</h1>
<p>how low can we go?</p>
<p class="view"><a href="https://github.com/polyester">View My GitHub Profile</a></p>
</header>
<section>
<h1>
<a name="plone-for-small-devices" class="anchor" href="#plone-for-small-devices"><span class="octicon octicon-link"></span></a>Plone for small devices</h1>
<p>To let Plone run reasonably well (or at all, in some cases) on low spec devices like the Raspberry Pi, various ARM-based USB-sticks and the like, you need to take some extra measures. In these pages I'll try to document those.</p>
<h2>
<a name="why-bother-in-the-first-place" class="anchor" href="#why-bother-in-the-first-place"><span class="octicon octicon-link"></span></a>Why bother in the first place?</h2>
<p>Well, because we can, of course. And because it is fun. And occasionally, even useful. I've given a talk called <a href="http://www.slideshare.net/bslash/is-that-a-plone-in-your-pocket">plone in your pocket</a> at the Ploneconference 2012 in Arnhem about this.</p>
<h2>
<a name="assumptions" class="anchor" href="#assumptions"><span class="octicon octicon-link"></span></a>Assumptions</h2>
<p>I'll assume you will run a Debian flavor on the device. It should work for other Linux varieties as well. I'm not documenting how to get your device to boot into Linux, as that can be found elsewhere (for the Raspberry it is very easy, for my current favorite devices <a href="http://ubuntu.g8.net/">Picuntu</a> is the way to go)</p>
<h3>
<a name="operating-system-tweaks" class="anchor" href="#operating-system-tweaks"><span class="octicon octicon-link"></span></a>Operating system tweaks</h3>
<p>The most important factor in getting Plone to run better is to tweak the filesystem. Write speeds on a Raspberry are abysmal. So you want to minimize those. As soon as the filesystem is created, do the following tweaks:</p>
<ul>
<li>tune2fs /dev/xxx -O has_journal -o journal_data_writeback (where /dev/xxx is your partition). This will disable journaling on the ext4 filesystem. Yes, a recovery after an unclean shutdown will take a bit longer. But hey, this is no mission-critical system we're building.</li>
<li>mount /dev/xxx -o noatime,nodiratime,data=writeback,barrier=0 This will disable some write-intensive options. Note: these are not a good idea on your high-security, high-availability production server...</li>
</ul><p>Also, go through the various logging functions on the OS. Debian, being that faithful and rock-solid OS, will by default log everything, sometimes in various places. You can probably do without full enterprise-grade logging on your USB-stick. Go through /etc/syslog.conf and see what you can live without, or just set to "critical only".</p>
<h2>
<a name="the-plone-stack" class="anchor" href="#the-plone-stack"><span class="octicon octicon-link"></span></a>The Plone stack</h2>
<p>On the Plone side of things, surprisingly little has to be tweaked. Make sure you're using Plone 4.3, or if you're playing with Plone 4.2 upgrade Datetime to 3.0.x in your buildout. This saves a <strong>lot</strong> of memory</p>
<p>I just use the Universal Installer. Use a standalone instance if your device has a single core. If it is a dual- or even quadcore device, you can choose: have 2 ZEO clients, in which case you'll also need
a simple loadbalancing to take place (Varnish or Nginx both can handle that). Or you leave the other core for the OS. Experiment, and tell me your results on your device!
</p>
<p>Also, you will want to disable as many languages as you can get away with for your purposes. Only enable the ones you need in your buildout.</p>
<p>Finally, disable the Zope access logging (if you're not interested in it, if you plan to put Nginx in front of it, and/or if you intend to use another access logging system like Piwik or GoogleAnalytics anyway)
Also set the Z2 log to "critical".</p>
<p>I've been known to fiddle with the object caches a bit, but that is also depending on the content you're planning to put on your nanoplone.</p>
<p>On the lower end of the hardware scale, you shouldn't install both Nginx and Varnish. Varnish alone will do just fine as a webserver and proxy, but it will also eat some memory. No problem on the newer devices with 1Gb or more memory, not a good plan if you're at 512mb or under. Then, use Nginx, and hope for the best ;-)</p>
<h3>
<a name="feedback" class="anchor" href="#feedback"><span class="octicon octicon-link"></span></a>feedback</h3>
<p>updates, corrections, and the like more than welcome.
That goes best by creating an <a href="https://github.com/polyester/polyester.github.com/issues">issue</a>
at github, or even better clone and do a pull request!</p> <p>If you're not a github person, you can email me: [email protected]</at></p>
</section>
<footer>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>