I have read a recent thread about ext4 being slower than ext3, and I have just discovered another problem.
I have developed an open source program that catalogs digital images: all the information, included image thumbnails, are stored in a single database. My own database contains almost 20000 images and its size is about 460 MB. The program uses an embedded copy of Firebird for the Linux, Mac and Windows versions. When I open a catalog (a Firebird database) the program executes a number of queries to (partially) fill some tree controls that work like folders in a file system. The queries are always very simple, something like "SELECT * FROM Table WHERE someID = 5". The number of queries that are executed when opening a catalog changes with the stored data: for my own catalog the program executes approximately 600 queries. In Windows opening a catalog has not perceivable delay: the queries execute instantly. The same happens for the Linux version when it runs in a virtual machine. Now I have installed Ubuntu 10.04 LTS 64 bit in my laptop, formatting the disk partitions with the ext4 file system. When I use the same program to open my catalog, it takes about 23 seconds. That is in incredibly long time and I really cannot imagine how can it be so slow. For the whole 23 seconds the hard disk works continuously and cpu usage is very low. If I close the program and I open the catalog again, it takes the same 23 seconds again. When opening a catalog the program executes only SELECT queries, so it is only reading the database. It looks like Firefox reads are not cached, but this is very strange. Disk reads are usually cached: if I open a large program for the first time the hard disk works, if I open it again the disk does not work any more, so those reads are cached. I cannot imagine why Firebird disk reads are not cached, but this could be an explanation. The problem is that not only opening a catalog takes a lot of time, the program is painfully slow also when it is used. It is rather near to being unusable. I have tried copying exactly the same database file to an external hard disk connected to an USB port. The disk is formatted with ntfs and if I open that database the program's performance it lightning fast: instant catalog opening, and very fast usage. They are the same performances as the Windows version. The program uses an embedded copy of version 2.0.6. I have also tried installing version 2.1.3 super from the Ubuntu repositories but performance is the same. I have just reduced a little the size of my /home partition and I have added a small ext3 partition. I have copied the database to that ext3 partition: opening the catalog is very fast and the program runs very fast again. So it looks like there is a very big problem with ext4. Unfortunately mine is a desktop program so I cannot say "do not use ext4" or "do not use Ubuntu". People expect that the program works well with their own computers. I have also checked the hard disk with GSmartControl and it seems to work well. No errors or warnings reported. No disk errors in the system logs. It would be great if it were possible to fix this problem in some way. I would be glad to help in any possible way, giving more information and eventually testing. I can also post the database if anybody wants to test it. Thanks in advance Fulvio Senore ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel