egpms_ctl 1.0 released for Gembird EG-PMS

egpms_ctl combines a Linux Kernel module and a python control script to give you reliable access to Gembird EG-PMS or silvershield programmable power outlets.

Last weekend I released version 1.0. The kernel module got a complete cleanup including a format change of the schedule sysfs files. Those are now seperated by ‘,’ and ‘;’. For example the following command sequence will add a schedule to start in 1 minute with enabling the outlet and after another 2 minutes it will disable it again.


As you may see in this example, you are now able to use real words to describe the desired outlet state. Possible are ‘on’/'enabled’/’1′ and ‘off’/'disabled’/’0′.

You can obtain the source code from or

1 vote, 5.00 avg. rating (92% score)

How to install cbenchsuite on Debian stable

There are some requirements you have to install before starting to clone and install cbenchsuite.

apt-get install git autoconf libtool pkg-config gperf ncurses-dev uuid uuid-dev sqlite3 libsqlite3-dev

Some explanations of those depencies:

  • git – clone cbenchsuite
  • autoconf, libtool, pkg-config, gperf, ncurses-dev – Build of kconfig-frontends
  • uuid, uuid-dev – To generate uuids for each indivual test execution
  • sqlite3, libsqlite3-dev – cbenchsuite backend storage

Now you can simply install cbenchsuite:

git clone git://
cd cbenchsuite

At this point a menuconfig dialog will start and you can configure your cbenchsuite instance. It is safe to exit the dialog directly and store the default configuration. You can change this afterwards.


This make call will compile cbenchsuite itself based on the configuration file ‘.config’. Afterwards you can use cbenchsuite as described in the README file.

0 votes, 0.00 avg. rating (0% score)

Linux 3.6 – 3.9 CPU scheduler performance

This is the first big series of benchmarks with the high accuracy cbenchsuite, The focus for those benchmarks was the performance of the Linux CPU scheduler in different kernel versions. I used two different systems, an old AMD dual core and a newer Core i7-2600 quad core, which is slightly overclocked. The systems were benchmarked with kernels 3.6, 3.7, 3.8 and 3.9-rc4. This post will give you a few interesting results but it is not a summary and it has no conclusion. This is actually about releasing the raw data of my measurements.


  • 10 different benchmarks, e.g. kernel compile, hackbench, fork-bench, …
  • A lot more different benchmark configurations, e.g. number of threads used
  • 4 monitors used to record memory, scheduler, … statistics
  • Kernel caches and swap was reset before each run for higher accuracy


Let’s start with some hackbench results. Hackbench spawns a number of groups of processes which communicate within the group. The runtime is shown in the following two charts.

dual core hackbench

Dual core system Hackbench results.

You can see that Linux 3.7.0 was actually the fastest overall kernel in this benchmark. With usage of pipes, the latest kernel 3.9 is on the same bad level as 3.6. Without pipes, 3.9 is actually not as bad as with pipes. However it’s also not the fastest in this benchmark on a dual core.

hackbench quad core.

Hackbench on a quad-core.

You can see similar results as on the dual core system. Unfortunately, this is not the best benchmark for 3.9, but 3.7 is still very good.

Continuing with the standard kernel compile benchmark.

kernel compile dual quad

Kernel compile benchmark on dual and quad core.

In this benchmark, 3.9 can outperform the other kernels significantly on the dual core. But there is no performance difference on the quad core system visible. I couldn’t find any explenation for this difference in the monitor results. However I found some interesting difference in the number of contextswitches for the dual core system.

single threaded kernel compile contextswitches

Number of contextswitches while compiling the kernel with 1 thread.

You can see that they have different task switching behavior especially on the dual core system. But if you compare those differences with the performance differences above, you can’t see any significant changes.

Result links

The following links will point you to the generated websites with a lot of results. There are three complete sets of visualized results available, all on the same dataset. The first contains both systems, the second shows just the dual core, and the third only the quad core. All generated html files will need javascript.

3 votes, 4.00 avg. rating (81% score)

cbenchsuite – High accuracy C benchmark suite framework

cbenchsuite is a benchmark framework written in C and Python for easy, high quality system performance measurements and visualizations. It was specifically designed and tested for Linux. The first set of plugins included in the benchmark suite is aimed at measuring the performance of the CPU/Linux CPU scheduler.

This is the first release (0.1). After a lot of testing and development, it should be stable enough. If you find bugs, please contact me.

Download, Documentation and more Information



  • Complete framework
    • Benchmarking systems
    • Storage in sqlite3 databases
    • Automatically generate figures and websites for the results
  • Efficient benchmark framework
    • written in C
    • unloads unnecessary modules before benchmarking
  • High accuracy
    • Efficient framework implementation
    • Setting scheduling priorities to get accurate monitor information
    • Warmup benchmark execution to remove measurements of cache heatup
    • Data is stored with the number of preceding benchmark executions to be able to determine the cache hotness after the benchmarks
    • Repeat benchmarks until the standard error drops below a given threshold
    • Plugins to reset Linux kernel caches/swap etc.
    • Store system information and plugin component versions to seperate different benchmark environments
  • Extendable
    • Extensive module/plugin/benchsuite interface that can be used without changing any core source files
    • Storage backend interface
  • Configurable
    • Many configuration options like minimum/maximum runs/runtime per benchmark
    • Execute combinations of plugins defined via command line arguments or as a seperate benchsuite inside a module
    • Plugins can have options and different versions

Example plots

hackbench stacked bar chart

Hackbench stacked bar chart.

cached data kernel compile

Kernel compile memory monitor recording the amount of cached data.


0 votes, 0.00 avg. rating (0% score)

How to DIY 42 watt LED room light

Last week, one of the three halogen light bulbs got broken. So I had the choice of replacing the one light bulb or searching for another possibly better way to light up my room. I really like LEDs so I searched for some ideas for a complete room.

My goal was to reach at least 3000 lumen. I found some nice high power led stripes with a high CRI of 90. Unfortunately they need heatsinks, which I never used before in any project. In the following I will give you a complete partlist and a rough assembly guide with some hints. But first some pictures of the finished LEDs with heatsink. As you can see, I am really not very good at combining the parts, but it works, and that’s the important thing ;) .

You need basic soldering skills to connect wires to the LED stripes.

LEDs with heatsinks

LEDs with heatsinks. ~21W per module.

LEDs in action

LEDs in action. You should never look into the LEDs, but also the camera has problems with the amount of light ;)

The whole system has a total power consumption of 42W. The heatsinks heat up to 45°C. Theoretical about 2800 lumen, but I can’t measure that. It is bright enough to light my whole room. My previous lamp had 2x 50W halogen light bulbs and was much darker.

Continue reading

0 votes, 0.00 avg. rating (0% score)

Partial sorted list scheduler – pslist

pslist is a fair O(1) Linux CPU scheduler with a very easy design. The concept of a partial sorted list only works for scheduling problems, I will explain the datastructure later in this post, first some benchmark results.

Benchmark Results

The results were measured on a dual core AMD Athlon X2 5000+ at 2.6Ghz with cool’n'quiet disabled. CFS and pslist were measured based on Linux 3.6, without stable updates (more details). All plots include 0.95 confidence intervals. All measurements were repeated at least 5 times and 10 minutes. Depending on the relative standard errors of the results, the measurements were repeated until a maximum runtime of 60 minutes per benchmark. If you have questions about the setup, ask in the comments.

Here are some benchmarks with significant differences between both schedulers. We begin with the influence of complexity classes, pslist O(1), CFS O(log n). The yield benchmark tries to make as much ‘sched_yield’ calls as possible, for a limited amount of time. The calls are executed in parallel with the given number of threads. The plot shows the number of iterations reached, more is better.

You can clearly see the advantage of pslist, which has a very low time consumption. List operations are much cheaper than red-black-tree operations. Especially with an increasing number of threads, pslist reaches significantly more iterations than CFS.

The same complexity class influence is visible in the hackbench benchmark. With 400 processes, pslist is again better than CFS. This plot shows the runtime necessary to complete the benchmark, so less is better.

Continue reading

0 votes, 0.00 avg. rating (0% score)

egpms_ctl – Gembird EnerGenie kernel module and control tool

EG-PMS is a USB-programmable power outlet. This kernel module adds reliable linux support for all devices in this family, which includes the previous so called sis-pm devices.

As you probably know there is already a project supporting these USB devices, called sispmctl. They did a great job in reverse engineering the USB protocol. Unfortunately the device itself isn’t very reliable. It may happen that it reconnects randomly or returns a wrong serial number. So addressing a special device may become impossible. That’s the reason for porting the protocol into a kernel module, which is much more reliable and can be addressed by USB-IDs.

Download and documentation at github.


  • Python 3
  • Linux 3.3 or above


Thanks to the sispmctl project for their tool and the USB-protocol, which I used for the kernel module.

0 votes, 0.00 avg. rating (0% score)

Linux High Throughput Fair Scheduler

HTFS was supposed to be a Completly Fair Scheduler (CFS) replacement for servers. I developed it for my bachelor thesis. The idea was to have a fair scheduler with a complexity class of O(1). The design supports most of the kernel scheduler features, including taskgroups. This is the release of my bachelor thesis, all measurements and the HTFS kernel patch. I am not developing this scheduler, because it is more important to reduce calculation- and contextswitch-overheads than reducing the complexity class.


The server market is continously growing to fullfill the demands of cloud com-
puting, internet related servers, like HTTP or Email server, high throughput
computing and much more. To reach the highest possible ressource utilization,
modern operating system kernels are highly optimized. This also is the case
for the Linux CPU scheduler. But especially for servers the Completely Fair
Scheduler has some performance flaws.
In this bachelor thesis a new CPU-scheduler design is proposed. The High
Throughput Fair Scheduler (HTFS) is a multi-queue design, which is able to
fullfill O(1) limitations. To assure fairness to all tasks this classical queue-
design is extended with virtual runtimes. Through a non-strict fairness HTFS
can work with less task switches, which results in higher throughput. HTFS,
aimed at high scheduling speed, fairness and throughput, is able to compete
with the Linux version 2.6.38 CPU-scheduler.


Thanks to Matthias Grawinkel, Tobias Beisel and Andre Brinkmann for suppoting me.

0 votes, 0.00 avg. rating (0% score)

pbenchsuite – Python benchmark suite

pbenchsuite is deprecated, use cbenchsuite instead

pbenchsuite is a python benchmarking suite will help you to benchmark any system or operating system with a lot of additional information about system state over time. Especially for operating system development those additional information may help you to figure out what is going wrong.


  • Automatic execution of several seperated benchmarks
  • Control about the number of repititions of an benchmark based on:
    • Min/Max runs
    • Min/Max runtime
    • Reached mean dependent standard error, e. g. with a mean of 100, you can setup a standard error abort rule of 0.001, which will in this case terminate when the standard error is less than 0.1 (mean 100 * 0.001)
  • Configurable number of warmup runs to eliminate cold cache measurements
  • Monitor support for different essential system parameters (memory, paging, scheduler stats, etc.)
  • Plotter framework including a generic plotter. The framework offers easy functions for up to 3 dimensional bar charts (stacked bars) and 2 dimensional plot charts.
  • Json result format with all important information (results, versions, system information and monitors)
  • Expandable. If you created new benchmarks, benchsuites, monitors or plotters, please contact me.
  • Configurable

Download and Documentation

This project is hosted on github. The documentation is embedded in dummy and example files.

0 votes, 0.00 avg. rating (0% score)

HTFS – High Throughput Fair O(1) Scheduler for Linux

For my bachelor thesis I started developing a new O(1) scheduler as a
replacement for the Completely Fair Scheduler. The main goal was to achieve
fairness and higher throughput. Currently I am improving the scheduler and solving
some multi core problems. I started this project for my bachelor thesis, which
is already finished. The following results show the performance of the scheduler in
the version for the bachelor thesis.

More results will follow with better versions for multi core systems.

For the evaluation I used the Phoronix Test Suite.

Performance of Bachelor Thesis Version

Here are some selected benchmark results of HTFS compared to CFS. HTFS uses
the CFS load balancing algorithms on multi core system. But as already mentioned,
there is a small problem. So to see the real performance benefits of HTFS, I am
using single core results for comparison with CFS.

kernel<br /><br /><br />compilation results

Starting with the standard kernel compilation benchmark. HTFS is 2.94%
faster than CFS, which is similar to all other tested compilation benchmarks.

Apache Benchmark<br /><br /><br />results

Continue reading

0 votes, 0.00 avg. rating (0% score)