Michal Čihař - Blog Archives for English

Fighting with tons of mails

Recently spam checking stopped to be enough to prevent my mailbox to grow to incredible sizes, so I had to look for some possibility to block viruses and other malware. The obvious choice went to open source anti-virus Clamav.

Setting up was pretty easy, especially when there are tons of howtos on the net (e.g. Installing and configuring Exim 4 on Debian). All I had to do was to install Clamav and configure Exim to talk to it and reject unwanted stuff.

And what are results? Quite impressive - 154860 caught viruses in last 24 hours.I wonder that lots of them were also caught by SpamAssassin, because I definitely didn't receive that much malware in a day.

Gammu test version 1.11.90

I just released new version of Gammu, you can download it from download server. The biggest change is new API. It is probably not yet completed, but I want to release it right now to receive feedback from other developers. Full list of changes:

  • Support for some new Nokia fields.
  • Made SMSD mode case insensitive.
  • Fix iCalendar export typo (Alin Năstac).
  • Better compatibility with Sharp phones.
  • Completely changed public API to avoid too often ABI changes.
  • See PORTING file for changes you have to do.
  • Dropped autoconf support, use CMake instead.
  • Please note that new API is still work in progress!

goText supports Czech Vodafone

goText (Java apllication for your phone to send messages onver GPRS) has just received support to send messages to Czech Vodafone network. It is using public SMS gateway, the only drawback is that you have to detect captcha used on this page. But it still is cheaper than sending regullar SMS :-).

To use this service, add following URL to your goText services:

http://www.gotext.org/pub/cz-vodafone.php

Ukolovnik 0.7

New version of simple todo manager called Ukolovnik has been just released. Version 0.7 comes with following changes:

  • Development switched to subversion.
  • Added support for CSV export.
  • Added support for vCalendar export.

MediaWiki caching

Steve, I know that caching usually helps. But from all test I've made with MediaWiki installation on phpMyAdmin wiki, I can see that enabling any caching slows things down quite a lot.

With memcached based caching, each request takes about 15 seconds, if I add XCache backend for variables, it slows down things to 10 seconds and I receive same results with file based caching. So it doesn't seem to be problem with memcached, but rather MediaWiki issue. Unfortunately it's quite a lot of PHP code to investigate and I didn't find anything obvious in low level caching interface.

So say good bye to variable caching, opcode cache is enough for now and MySQL seems to handle the load quite well.

XCache in Debian is up to date

Same time I complained about not up to date xcache package, I wrote to current maintainer whether I can adopt it. As he promptly agreed to this, we now have up to date package in Debian archives.

The only thing I messed down is that I did upload in hurry and didn't check which all bugs I can close by it. Today it turned out that all opened bugs could be closed, so I made another upload just to close those bugs ;-).

Xcache opcode cacher

As I wrote in previous post, memcached didn't help as expected with wiki performace, so it was time to look for something else.

Since I'm using lighttpd, I still considered using of XCache, but the Debian package is not really up to date (now it even does not install with current php), so it was too much effort.

But today I decided it's time to try it. I built package from current version (you can get it on debian.cihar.com), installed and it seems to increase performance a lot. Most visible it is on wiki pages, which now take about quarter of time to process. I only hope it won't have any stability impacts, but it survived fine stress tests I did so far.

Caching slows things down?

I've been using memcached for some time on phpMyAdmin wiki and it seemed to help. But recently the performance went down. I didn't have time to investigate it till today and it turns out to be caused by memcached. When I switch it off, page load time goes from 16 seconds to 0.25 seconds.

I tried to search for some similar problems on the net, but I didn't succeed. So for now wiki runs without memcached and I will look at other possibilities of caching later.

Update: If you're interested about versions, it is MediaWiki: 1.7.1, PHP: 5.2.3-1 (cgi-fcgi), MySQL: 5.0.41-Debian_2-log and I have enabled persistent connections to MySQL.

New Gammu API

Thing I longer wanted to happen is now becoming reality - Gammu is getting new public API. Man reasons for the change are:

  • ABI stability. - Till now almost every change in internals of any driver lead to ABI change. If we would correctly increase so name on each ABI change, we would be somewhere near 200, what is not something we could be proud of.

  • Centralisation of variables cleanup. - Currently all phone drivers have to do some common things in each function. New API allows to centralise those operations in one place.

  • Exposing of internals. - Old API exposed too much of Gammu internals, what could be misused by programmers and could lead to unexpected behaviour when some internals are changed.

The work is not yet still complete, but the API is getting final shapes right now, so you still have chance to change something. While doing such big change, I decided also to complete documentation of all public functions. This is also currently work in progress, but arising API documentation is already available.

If you are developer using Gammu library, you will have to change some things in your code. To document these changes, new Porting guide has been created. I suggest you not to start with this right now as the API is really not complete and might change a lot during next days.

IMAP utils 0.1

For long time I use few Python scripts to manage mails on IMAP account. On Tuesday I decided to put them under version control and improve them a bit, because I didn't want to have login information hardcoded in every script.

I made several improvements, added support for distutils and then I decided that I could also release this to public. I've named them IMAP utils, I made announcement to freshmeat.net and Python Cheese Shop (thanks to ./setup.py register) and now I wonder that these simple scripts have over hundred downloads and eight subscribers. Maybe it is not that useless as I thought :-).