Tag Archives: tuning

Fix HP Compaq 6910p Fan Noise under Linux

Although I prefer Macs as my primary work horses, I keep a trusty old HP Compaq 6910p around as a fallback. While generally nice the 6910p has one major flaw when being run with Linux: The fans will keep running constantly, emitting a high frequency whine that makes working unbearable in a couple of minutes. By chance I found a fix for the problem here. Open a terminal window and issue the following commands:

sudo -i
for i in 0 1 2 3 4; do echo "0" > /sys/class/thermal/cooling_device${i}/cur_state; done

While this will not completely eliminate the fans spinning up, it will at least make them spin down again when no more cooling is needed.

Astaro ASG as OpenVPN Access Server client

Just about four weeks ago I posted about the resurrection of the .ovpn to .apc converter script. In the meantime Alois told me in the comments that while this was nice it didn’t work for current versions of the OpenVPN Access Server and the .ovpn files it creates.

Well, since there’s been nothing much else to do I did some more work on the script and I can now happily say that it now also converts the new .ovpn format to an .apc the Astaro can understand. Unfortunately, there’s a little catch: the OpenVPN Access Server relies on ‘tls-auth’ for client connections and the Astaro neither knows of that concept not provides a method to import the needed key file. So I had to do some creative manipulation to make the Astaro do my bidding to include the necessary config statements. In addition, you will need to manually copy the key file to the Astaro to make everything work as expected. To make things as easy as possible, the script will tell you what to do.

If you’re interested, check out the latest version of ovpn-to-apc.sh on Gitorious. If it works for you, let me know. If it doesn’t, let me know, too.


Es hat sich ausgelaufen


Ein bisschen über 160.000 km hat sie gehalten – jetzt hat sie sich ausgelaufen und ich muss mir eine neue Antriebsratte suchen. Mist. Aber bei der Gelegenheit kann ich dann gleich die Kugellager am Laufrad wechseln.

Building A 64-bit Resin On Solaris 10 Using SunStudio 12u1

This has been bothering me for quite some time. Resin is one of the best application servers I’ve come across. But to get the best performance out of it, you need to recompile it for your platform. While this is no problem on Linux it never quite worked out on Solaris for me when using SunStudio 12. But now I finally made it happen. Here’s how.
Continue reading

Speed up WordPress with memcache

We all love WordPress. But, honestly, it’s everything but fast. An easy way to speed it up a good deal is to make it use memcached for storing some of it’s data. And doing this is actually easier than one might think. There are some pre-requisites:

  1. Download and install libevent
  2. Download and install memcached
  3. Download and install the memcache extension for PHP

The first two follow the standard

"./configure; make; make install

route. For the third I suggest using

./configure --enable-memcache
make install

Take note where the extension is intalled and have PHP load it by adding


to your php.ini. There’s a chance you’ll have to edit the line


, too, to reflect the actual path where the extensions can be found. After restarting PHP you should see the


extension in the output of phpinfo.

If everything is fine, we can add memcache support to our WordPress installation:

Continue reading

FastCGIExternalServer demystified

Separating Apache and PHP has some advantages. Faster delivery of non-PHP content, lesser load on the servers to name just the most obvious ones. That’s why you can find this kind of setups mostly at smaller ISPs. To really benefit from the separation of Apache and PHP, however, you’d need to move PHP to completely seperate servers.

That’s where


comes into play. In theory this Apache configuration directive allows you to specify an external server where all requests for PHP scripts (or any other resources you define) will be sent to. But where you’ll find plenty of documentation about how to install a FastCGI server on the local machine, the documentation about how to use an external server is almost non-existant. And the official documentation doesn’t really help and neither does the FAQ. Or would you find this helpful:

What is the path used with FastCGIExternalServer?

Since all FastCGI directives are global (they are not configured in a server context), all FastCGI paths map to the filesystem. In the case of external servers, this path does not have anything to do with the file system; it is a virtual file system path. Since the connection between mod_fastcgi and the FastCGI app is by a socket (unix or tcp), mod_fastcgi does not care where the program is (it could be on a completely different machine). However, mod_fastcgi needs to know when a hit is calling for an external app, so it uses this path as if it were a local filesystem path. Apache translates a request URI to a filesystem path.

Most ironcally, it’s exactly the path mentioned above that causes most users to give up on


. Ok, so let’s get our hands dirty. Follow me into the abyss of weird logic and software bugs to finally get your external PHP server up and running. On the way you’ll learn that nothing is as it seems and that the FAQ entry quoted above is misleading at best.

[ Continue reading » ]


How To Convert Any Video File Format Under Linux

This video tutorial will explain how to losslessly convert any video file format, including quicktime .mov, flash .flv files, open source .ogv, .mp4, .wmv, .asf and more. I show you how to install ffmpeg, check the formats and codecs available to you, convert a file to a new format (windows media and .asf in this example) without any loss in quality during the decoding and encoding process, and create and run a script file that will enable you to run a batch conversion on any number of files at the same time.

Continue reading

Astaro PostgreSQL Fix

For some months now my Astaro firewall was unable to start the PostgreSQL service on boot. Since this didn’t seem to have any real impact on function or performance, I started some feeble attempts at fixing it but never succeeded until today.

Continue reading

Amazon Web Service Introduce Monitoring, Auto Scaling, Load Balancing

aws_logoToday Amazon Web Services announced a set of three new services that are targeted mostly at largs scale customers: Monitoring, Auto Scaling, Load Balancing.

Continue reading

Mirrorbrain: A DIY-CDN-Framework

mirrorbrainI really wonder how this has managed to slip my attention for so long. With MirrorBrain you can set up a distributed content delivery network. What it does is to redirect users according to GeoIP location detection to the server nearest to them.
Continue reading

PHP: Fix For The Empty $_POST Array

One of the reasons I “love” PHP so much is that it sometimes poses problems the solution of which makes you scratch your head in wonder. Take for example the spurious “empty $_POST array” problem. It is easy to recognize for what happens is that parameters passed to a PHP script via a POST request won’t show up in the $_POST superglobal array.
To fix this, first make sure that you really pass the parameters. This can be easily checked:

Continue reading

MySQL 5.4: Not for me, yet ;)

Since Sun bought MySQL, the pace of the releases has increased a lot. Ok, we’ll see whether this will continue, but still. So now it’s MySQL 5.4. Not only quite a big jump in the minor numbers but also some improvements, the community has asked MySQL to integrate for quite some time. Especially the code contributed by Google has finally made it into MySQL. One might ask “What took you so long?”. Still, even with those improvements, the new version isn’t for me. Why?

Continue reading

Developing on the ReadyNAS: The right Config

One reason why I like the ReadyNAS products from Netgear is that they’re basically Linux system. That means in theory I can compile and use all the stuff that’s out there in the Open Source. In reality, this sometimes isn’t just that easy. Especially on the NV/NV+/Duo/1100.

That’s because some projects still use very old versions of




to determine the system they are being compiled on. You will recognize such applications by the error “unknown system type” when trying to compile them on your ReadyNAS. But this can be fixed easily.

Continue reading

Unhold Sendmail Queue

It’s really so simple that I always forget it: To make


resend all mails currently in the queue, issue

sendmail -q


Really here for reference only.

MySQL Security: The Secret of the Temporary Table

After reading the headline, I guess you now wonder what’s so special about a temporary table. And if you are a programmer you might even think “Heck, I’m using temporary tables all the time.”. Good for you, if you really do but chances are that you don’t.
The key here is the definition of what a temporary table in MySQL actually is. To most programmers it’s just a table they create for temporary use and delete afterwards. Well, sorry guys. That’s not a temporary table at all but just your well-known, friendly MySQL table as every other table in your database. It’s just a bit short-lived, that’s all. Now let’s talk about real temporary MySQL tables.

Continue reading

Tuning the Sun: Fiddling with the TCP/IP stack

Well, it’s over one and a half years that I first posted some hints about tuning the performance of a Sun web server. Now it seems that I found what looks like the optimum settings for the machines I’m currently watching over:

tcp_conn_req_max_q               1024
tcp_conn_req_max_q0              10240
tcp_rexmit_interval_min          2000
tcp_ip_abort_interval            600000
tcp_ip_abort_cinterval           60000
tcp_keepalive_interval           3600000
tcp_time_wait_interval           30000
tcp_fin_wait_2_flush_interval    67500
tcp_smallest_anon_port           8192 

That’s mostly consistent with what Jens S. Vöckler writes on his site, just a bit more condensed.