MongoDB Aggregation: Group by any time interval

Since version 2.4 MongoDB offers a powerful aggregation framework, which offers great functionality without the hassle of map/reduce. You can group your results by any (calculated) field. Using the date operators you can for instance group your results by day and sum your results. Assuming you have a collection with a MongoDB Date and a [...]

#2013 – Lost connection to MySQL server during query – OR: MySQL VOODOO!

Today one of my scripts prompted the #2013 MySQL error while querying a huge innoDB table (31GB in ~154million rows). Some queries worked, some just failed. Looking at the logfiles, I saw the following message: InnoDB: Page checksum 1840120551 (32bit_calc: 1224736073), prior-to-4.0.14-form checksum 1811838366 InnoDB: stored checksum 3031359782, prior-to-4.0.14-form stored checksum 1811838366 InnoDB: Page lsn [...]

Creating Website Screenshots on Linux

Today a customer asked for automated screenshots of his website. So first thing to do was asking Google how it could be accomplished on a Linux WebServer. Most of the results referred to installing an X-Server, using Firefox and stuff. This sounded a bit tricky and quite frankly.. over the top. The solution I came [...]

Creating screenshots with FFmpeg is slow?

Just a quick note for everyone who’s using FFmpeg for creating screenshots from video files. Today I noticed that FFmpeg can be VERY slow on large/long movie files, but there’s a pretty neat trick to speed up the screenshot generation. I used to create my screenshots this way: ffmpeg -i /var/www/input.mov -y -f image2 -ss [...]

node.js – NetTank Browsergame

Some say, node.js helps you to make your applications scale. In fact, it’s really fast and flexible. Check out this realtime browsergame, build with node.js. Some say, node.js helps you to make your applications scale. In fact, it’s really fast and flexible. Check out this realtime browsergame, build with node.js.

PHP – Smarty block caching

It might sound like a trivial task to cache Smarty templates, but when your website starts growing you should consider some more advanced strategies of caching your content using Smarty.

Magento – Performance Analysis

In our office we are currently evaluating the pros and cons of Magento. Besides all the great features it offers it has a huge con – the performance. We read a lot about it but couldn’t find any reliable statements about how fast or slow it really it is. So I put a plain Magento install on my testing machine and gave it a shot..

Setting up a Testing-Environment

Let’s start with the basic setup for my test scenarios. In our office we had an old and dusty, but still working Intel Xeon 3305 left. It has 2Gigs of RAM and a 1TB SATA harddisc. It’s nothing special, but still good enough for some benchmarks.

Server:

* Intel(R) Xeon(R) CPU 3050 @ 2.13GHz / 2GB RAM

´╗┐Software

* CentOs 5.5
* nginx/0.6.39 (4 worker threads)
* PHP 5.2.9 (cgi-fcgi) + Xcache via spawn-fcgi (10 worker threads)
* mysql Ver 14.12 Distrib 5.0.77

Yet another blog

as if there weren’t enough blogs out there in the wide wide web,┬á I had to share my thoughts too. Hopefully you won’t regret wasting your time here and enjoy a few of my thoughts and experiences that I’m gonna share here… every once in a while. This blog is supposed to deal mainly with [...]