 |
December 25, 2013, 05:27:05 PM |
|
Good news on NXT on RaspPi:
The server is running quite smoothly on the Oracle SE Embedded JRE. Startup time is down to less than 1 minute (vs. >7min on openJDK7), shutting down takes close to half a minute now. The web client is responsive and fast, unlocking an address takes 1-2 seconds, though.
I used conservative settings, imho. This is what I ran, and what was output:
pi@raspberrypi ~/nxt $ ../ejre1.7.0_45/bin/java -Xms320m -Xmx450m -jar start.jar 2013-12-25 16:48:58.450:INFO:oejs.Server:main: jetty-9.1.0.v20131115 2013-12-25 16:48:58.789:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/home/pi/nxt/webapps/] at interval 0 [2013-12-25 16:49:01.485] Nxt 0.4.7e started. [2013-12-25 16:49:01.496] "blockchainStoragePath" = "blockchain.nrs" [2013-12-25 16:49:01.563] "myScheme" = "http" [2013-12-25 16:49:01.566] "myPort" = "57874" [2013-12-25 16:49:01.571] "myAddress" = "" [2013-12-25 16:49:01.575] "shareMyAddress" = "true" [2013-12-25 16:49:01.580] "myHallmark" = "" [2013-12-25 16:49:01.584] "wellKnownPeers" = "109.230.224.65; 78.46.63.221; 95.85.22.142" [2013-12-25 16:49:01.608] "maxNumberOfConnectedPublicPeers" = "5" [2013-12-25 16:49:01.612] "connectTimeout" = "2000" [2013-12-25 16:49:01.616] "readTimeout" = "5000" [2013-12-25 16:49:01.620] "enableHallmarkProtection" = "true" [2013-12-25 16:49:01.624] "pushThreshold" = "0" [2013-12-25 16:49:01.628] "pullThreshold" = "0" [2013-12-25 16:49:01.632] "allowedUserHosts" = "192.168.1.23; 127.0.0.1; localhost; 0:0:0:0:0:0:0:1;" [2013-12-25 16:49:01.637] "allowedBotHosts" = "192.168.1.23; 127.0.0.1; localhost; 0:0:0:0:0:0:0:1;" [2013-12-25 16:49:01.641] "blacklistingPeriod" = "300000" [2013-12-25 16:49:01.645] "communicationLoggingMask" = "0" [2013-12-25 16:49:01.651] Loading transactions... [2013-12-25 16:49:16.831] ...Done [2013-12-25 16:49:16.835] Loading blocks... [2013-12-25 16:49:34.681] ...Done [2013-12-25 16:49:34.692] Scanning blockchain... [2013-12-25 16:49:53.493] ...Done 2013-12-25 16:49:53.828:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4bbf80{/,file:/home/pi/nxt/webapps/root/,AVAILABLE}{/root} 2013-12-25 16:49:54.050:INFO:oejs.ServerConnector:main: Started ServerConnector@a5bce1{HTTP/1.1}{0.0.0.0:7874} 2013-12-25 16:49:56.921:INFO:oejs.ServerConnector:main: Started ServerConnector@664140{SSL-http/1.1}{0.0.0.0:7875} --- here I sent SIGINT (Ctrl+C) to shut down the server --- 2013-12-25 17:01:37.402:INFO:oejs.ServerConnector:Thread-0: Stopped ServerConnector@a5bce1{HTTP/1.1}{0.0.0.0:7874} 2013-12-25 17:01:37.411:INFO:oejs.ServerConnector:Thread-0: Stopped ServerConnector@664140{SSL-http/1.1}{0.0.0.0:7875} [2013-12-25 17:02:13.742] Nxt stopped. 2013-12-25 17:02:13.780:INFO:oejsh.ContextHandler:Thread-0: Stopped o.e.j.w.WebAppContext@4bbf80{/,file:/home/pi/nxt/webapps/root/,UNAVAILABLE}{/root}
I also set the DDoS protection to somewhat more aggressive settings (10 Req/s, 2s delay).
CPU and RAM usage are more modest than I had expected. The worst case CPU load while idle and synchronized - with the web client open and account unlocked - was 15-20%. Without the client open( still unlocked) it was less than 10% most of the time. There have been some peaks of full load from time to time, probably due to new blocks. RAM usage, which I saw as most critical, is not too bad either. I ran with 320M initial, which is way more than I even need. The mem area is only a third utilized. Are the SE Embedded data structures that much less space complex? Probably, that is a factor.
Running something else on the Pi while running the server should not be much of a problem. While I was testing, I cut back everything as much as possible (GPU RAM share, CLI only), but I think those modest utilization figures leave enough headroom for a GUI. If not, one can always use swap to mitigate.
Next thing I will do is making a ready-to-run-package for Pi users that they can put on their box.
|