Michal Čihař - Blog Archives for Website

Dictionary snapshots in more incarnations

On request I just added three new incarnations of dictionary snapshots. So if you're using display not capable of utf-8, you can use ascii variant, for those using non-Debian sdcv, notags variant has been created (but I anyway recommend you to apply patch to add Pango markup support). And finally there is combined super-crippled ascii-notags version :-).

Too much spam in Ukolovnik demo

Looking at the web stats, I noticed, that quite a lot of people find something relevant to "environmental" on my pages. As I was not aware of anything related here, I tried that in Google. To my surprise all results are in demo for Ukolovnik.

Well I do not want to add any anti spam technique to this simple tool as it will be usually password protected. And this is exactly what I did with demo for now. So if you want to use it, you need to login with user demo and password demo. I hope this will prevent spammers from using this demo, otherwise I would probably have to close it.

Phone database cleanup

Gammu Phone Database grew into quite big size and there were quite a lot of duplicate or poor quality records. So I today decided to do some cleanup of data inside it. First step was figuring out duplicates. There were quite a lot of them and I could remove about 50 records without loosing information about any phone.

The quality issue is always harder. Some empty records really did not make a sense, so they're gone now. However some users really don't understand what some features mean, so there were quite a lot of phones being reported to support MMS and I'm pretty sure there is no code in Gammu for it :-). I went through their list and dropped almost half of phones there. Some records might have been useful in other way, but I can not verify what all was wrong with them.

Maybe I should add some basic checks when adding new entry to check such errors as MMS support for AT connection.

New phone database features

Thanks to suggestion by Georg Lehner, Gammu Phone Database now support additional searching by supported features. So from now, you can easily search which phones support MMS (well I think this list contains few false positives, but that's what users have entered).

In addition to this, you can grab data in CSV format. It does not contain everything what is displayed online, especially emails are not exposed at all, but it might be useful to do some more complex statistics or queries. Format of this file might change in future, so please be smart enough when writing some parser for it ;-).

Yet another wiki died on spam

Some time ago I added links to FoneWiki.org to Gammu phone database to show more information about phones. The main reason for that was information about K750i phone, which I wanted to buy in that time.

Unfortunately as time goes on, this page seems to be almost the only one with interesting content on this wiki. Most of other pages are only templates or links to buy cheap v1agra or some other similar spam.

It's a pity that this server is gone, because I think such wiki is a good idea.

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 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.