Tag Archives: raspberry pi

Thanks for the support in 2016

Most people will say that 2016 was a terrible year and can’t wait for 2017. I agree that 2016 was not perfect for many people but it was a great year for linux-toys. I made this blog with the goal to influence people and drive that creative spark that we all have inside. In this blog post I will go over the website statistics and discuss a few of the blog entries that I thought were most influential for the year.

Continue reading Thanks for the support in 2016

My Journey to Improve Disk Performance on the Raspberry Pi


I switched to Gluster FS a while ago to provide easier container mobility across my Raspberry Pi Docker Cluster. Gluster worked great and was easy to get up and running but I had very poor performance. The average write speed was about 1 MB/s which is unacceptable for a filesystem that will undergo a lot of writes. I decided that it was time to take action and started looking at kernel parameters that could be changed.

Continue reading My Journey to Improve Disk Performance on the Raspberry Pi

Using PiCluster to run Scality S3

I released PiCluster last week and wanted to show how to run the Scality S3 server with it using Docker.  Scality S3 is an open-source object storage server. PiCluster is a simple and  lightweight container management and orchestration framework that I wrote in Node.js. Besides running containers, PiCluster can also perform health checks on applications to ensure that a service is actually running.  Before we begin, I am assuming that you already have Docker installed. Lets get started by  downloading PiCluster.

Continue reading Using PiCluster to run Scality S3

Using the Scality S3 Server in Homeduction

My previous post was about using Cloud Explorer with the Scality S3 server.  After I published that post,  I thought it would be informative to go one step further and explain how I use the S3 server in homeduction (applications run at home in production). My homeduction environment consists of four Raspberry Pi’s running Docker that power this WordPress blog and many other applications . My goal is to add an S3 server to store the images for this blog and anything else that I can come up with.

Continue reading Using the Scality S3 Server in Homeduction

Moving from a single machine with Docker to a cluster of Pi’s

I decided to finally make use of my four Raspberry Pi model 3’s and take the challenge to move all of my home services to them. Previously, I ran a x86 Desktop as a server in my living room. The loud noises coming from the server made it uncomfortable to be in sometimes. The loud noisy box is home to this website and many other applications such as Plex, Transmission, OpenVPN, Jenkins, Samba, and various Node.js projects all running in Docker. Having all of those applications running on a single box is a single point of failure and makes system administration harder when reboots are required.

Continue reading Moving from a single machine with Docker to a cluster of Pi’s

Removing logging to increase I/O performance on the Raspberry Pi

I recently was looking at optimizing the device to make Apache run faster. Thanks to TAFB from #raspberrypi on FreeNode IRC chat, I experimented with turning off syslog and noticed a few second increase with the two different sites hosted on the Pi. Overall, there will be less IO on the system and less RAM and CPU being used that will result in slightly better performance on the PI. Also, there will be significantly less writes on the SD card. SD cards have a limited number of writes so it is important to reduce the numbers to have a longer lifespan.

The distribution used is Arch Linux.

In /etc/systemd/journald.conf:

Manage The Services:
# systemctl stop systemd-journald
# systemctl disable systemd-journald

Remove Syslog:
# systemctl stop syslog-ng.service
# systemctl disable syslog-ng.service
# pacman -R syslog-ng

Next, I began to tune root filesystem for optimal performance and disabled logging.

Add the following to /etc/fstab:

/dev/mmcblk0p2 / ext4 rw,noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 1

# reboot

# tune2fs -o journal_data_writeback /dev/mmcblk0p2

Before: Rusher81572.com loaded in 2.857s
After: Rusher81572.com loaded in 2.149s

Before: Rusher81572.com/pi loaded in 4.356s
After: Rusher81572.com/pi loaded in 4.039s

Reducing writes by redirecting writes to /dev/null

This is a perl script that I use to take all the logs located in “/var/log” and redirect the output to /dev/null. This helps reduce the number of writes to the SSD card. This will help the SD card last much longer.

Save this as log.pl
@array=( ‘ssl_request_log’, ‘pacman.log’, ‘named.log’, ‘mail.log’, ‘fail2ban.log’, ‘error_log’, ‘access_log’, ‘auth.log’, ‘crond.log’, ‘daemon.log’, ‘errors.log’, ‘everything.log’, ‘faillog’, ‘kernel.log’, ‘messages.log’, ‘packman.log’, ‘syslog.log’, ‘user.log’);
sub sh { my $comm =”@_[0]”; open (command,”$comm |”);
while() { } }
foreach(@array) { sh(“rm -f $log$_”); }
foreach(@array2) { sh(“ln -s /dev/null $log” . $_); }

# perl log.pl

Gentoo Stage 4 for the Raspberry Pi

This is a great guide for getting Gentoo on the Pi. I did not see any stage4 installs available so I wanted to make one for the public to help save time on the Pi. If you follow all the steps on the Wiki yourself, it will take a few hours to accomplish the same steps.


Download the stage 4: https://www.dropbox.com/s/7m0dilz3me76mr8/stage4-01232013.tar

[insert url here]

Partition SD card :
100 MB -> /boot (/dev/mmcblk0p1) (Windows partition)
2GB or more -> / (/dev/mmcblk0p2) (Linux )

mkfs.vfat /dev/mmcblk0p1
mkfs.ext4 /dev/mmcblk0p2

Extract stage4-01232013.tar.gz somewhere

Mount /boot somewhere and copy the files in “boot” to it from the stage4 tar file.
Mount / somewhere and move everything else there.
Download the latest portage snapshot per the Gentoo Guide and extract it to usr/ on your new / .

Unmount everything and turn on your Pi.