Installing Influx DB on Raspberry Pi 2 (2015-10-18)
InfluxDB is a simple time series database written entirely in Go without external dependencies. This makes it attractive to have it running on a Raspberry 24/7 to collect home automation or stock market data or anything else which is waiting for being stored locally when the laptop is closed. I installed it a while ago and it is running well. Below my notes probably useful also for others (and also for me later on). I hope it is complete.
For Influx exists pre-built packages but unfortunately none for the ARM architecture required for the Raspberry.
Since it is written in Go and the Go compiler supports ARM it can be compiled from scratch.
First we need the latest and greatest Go compiler on the Raspi (currently 1.5.1) which needs to be compiled first itself. You can cross-compile it but having a recent Go compiler on the Pi is certainly useful. Since Go is now entirely written in Go (1.5) we need to bootstrap the compilation of Go.
Over in Dave Chaneys blog there is a recipe which works well also for 1.5.1. It takes an hour for compilation, but on the old Raspberry it took the whole night.
Having the current go version and the Go paths setup you should see something like that:
$ go version
go version go1.5.1 linux/arm
The next step is cloning the repository of InfluxDB and changing to its directory:
$ go get github.com/influxdb/influxdb
$ cd go/src/github.com/influxdb/influxdb
Changing to a stable tag of the latest version (git tag --list) can also not harm because we want to have a stable system.
$ git checkout v0.9.4.1
Finally the dependencies have to be resolved and then it can be build (being in the influxdb source directory.
$ go get -u -f -t ./...
$ go build ./...
$ go install ./...
For creating a complete package the gvm tool needs to be installed. That handles Go versions on the command line. Then the package.sh script could be used. But for my purposes I skip that.
For running InfluxDB we are going to use a user named influxdb and giving it a password:
$ sudo adduser influxdb
Now we let's install the InfluxDB binary to a global location.
$ sudo mkdir /opt/influxdb
$ sudo cp /home/daniel/go/bin/influxd /opt/influxdb/
$ sudo cp /home/daniel/go/bin/influx /opt/influxdb/
$ sudo chown -R influxdb /opt/influxdb
$ sudo chgrp -R influxdb /opt/influxdb
Also other directories needs to have the rights for influxdb user.
$ sudo mkdir -p /etc/opt/influxdb
$ sudo chown -R influxdb /etc/opt/influxdb
$ sudo chgrp -R influxdb /etc/opt/influxdb
$ sudo mkdir -p /var/run/influxdb
$ sudo chown -R influxdb /var/run/influxdb
$ sudo chgrp -R influxdb /var/run/influxdb
$ sudo touch /etc/default/influxdb
$ sudo chown -R influxdb /etc/default/influxdb
$ sudo chgrp -R influxdb /etc/default/influxdb
As influxdb user the config needs to be created:
$ su influxdb
$ /opt/influxdb/influxd config > /etc/default/influxdb
For getting the daemon booted automatically we need to install the rc script as root.
# cp <...>/src/github.com/influxdb/influxdb/scripts/init.sh /etc/initd/influx
Then we add it to the runlevels (in /etc/initd).
# insserv influx
Starting the service...
# service influx start
Starting the process influxdb [ OK ]
influxdb process was started [ OK ]
Now it is time to test if it is running:
# service influx status
influxdb Process is running [ OK ]
You can also connect now with your browser to port 8083.
Using GPUs with #golang (2014-05-07)
A nice presentation about how to use the Go programming language (#golang) with CUDA (from FOSDEM 2014): Scientific GPU Computing with Google's Go Language
Go 1.1 Released (2013-05-06)
The new version keeps compatiblity and adds several language and library changes. Some of them are method values, terminating statements, the size of int on lx-amd64 (now 64 bit), as well as heap size changes for large applications. The complete list is here.
Nvidia's Hyper Q Helps Applications to Share One GPU (2013-04-30)
This interesting article describes how the Hyper-Q scheduler from Nvidia is used in order to run multiple MPI processes concurrently on one GPU. Using the alarm state (in order to exclude fully loaded hosts/GPUs for new jobs in the Grid Engine job list/queue) and load values/load thresholds from the GPU and the CPUs Grid Engine should be able to handle this scenario well.
Management and Monitoring of GPU Clusters (2013-03-26)
This presentation from the HPC Advisory Council Conference 2013 gives an introduction about management and monitoring of GPUs.
Why NUMA Matters and Univa Grid Engine Supports CPU and Memory Affinity (2013-02-28)
Benjamin Cumming from the Swiss National Supercomputing Center explains in this video core binding and memory affinity on NUMA machines in general.
Intel Launches own Hadoop Distribution (2013-02-27)
Intel deploys now its own Hadoop. More information you can find here, or here. Intel hosts its source code at github. For official Intel information go to the Intel Hadoop page.
Intel also approaches security questions with Project Rhino: "As Hadoop extends into new markets and sees new use cases with security and compliance challenges, the benefits of processing sensitive and legally protected data with all Hadoop projects and HBase must be coupled with protection for private information that limits performance impact. Project Rhino is our open source effort to enhance the existing data protection capabilities of the Hadoop ecosystem to address these challenges, and contribute the code back to Apache."