Archive for December, 2008

ionice: renice for your I/O operations

Monday, December 22nd, 2008

A few months ago I posted a crazy solution that would allow me to write a large file to disc without killing disk I/O and causing other production services to be impacted. I post this as a follow up to that. Shortly after making that post I learned of a utility called ionice, which takes advantage of Linux’s I/O scheduling capabilities. This utility is something akin to renice, but for disc I/O scheduling instead of CPU scheduling. I use it all the time now and the servers I manage are more stable because of it.

On the same note, I’d like to give a plug for another really nice tool called iotop. It’s a python program which gives an interface similar to top. It displays useful information about which processes are using disc I/O and how much.

Gmail unbearably slow? A minor fix.

Friday, December 19th, 2008

Over the past six month I have perceived that Gmail and Google Apps mail have become slower and slower. I’m using it on high-speed connections, so bandwidth is not the issue. I have lost quite a lot of time sitting around waiting for the Gmail interface to finish loading so that I could perform even the most basic operation. Even worse is that the way Firefox is implemented, if one window/tab has pending operations, you may not be able to do anything with other Firefox windows/tabs until those operations have completed, so I was often left with Firefox being totally wedged until Gmail would finish loading. The basic HTML interface is faster, but it’s no fun at all. Today I decided to do something about it, or at least try.

Through observation — and the interface gave me plenty of time to do it — I discovered that the overall slow loading seemed to coincide with the loading of the little star images next to each message row in a list view, which can be used to quickly flag a message as important. The image itself is transparent image called cleardot.gif and is used in a number of places. It is just a placeholder that the interface uses to mark where an icon will actually go, and then which icon gets displayed in that location is handled with CSS via a background image.

In any case, I noticed that if I disabled images altogether for the domain mail.google.com, that the interface speeded up absurdly, and was still quite usable. However, there were a few images that I didn’t want to go away. What I ended up doing was adding the offending image URL to my Adblock Plus rules. The web interface is now at least 50% faster for me, if not more.

The main things I notice as missing now are the paper clip icon indicating an attachment in the list of messages, and the star icons next to each message row. Neither one of those things was really necessary for me. I can still flag messages as important, just not through that icon, and attachments still show up in messages, I just can’t know if a message has an attachment until I open it, which is an acceptable loss for me for the incredible speedup of the interface.

The offending image URL for regular Gmail is: https://mail.google.com/mail/images/cleardot.gif. No big deal, it’s small, but sometimes it had to fetch that same image dozens of times to complete the interface.

Grpahical GPRS utility for Openmoko SHR distro

Monday, December 15th, 2008

This past weekend I flashed my Openmoko Neo Freerunner to the software distribution known as SHR. Immediately I was very pleased with the look, and after playing with it most of the weekend, I’m now attempting to use it as my primary phone.

GPRS was working, but I wasn’t satisfied with any of the current graphical tools to launch it, of which I only knew of one, and launching at the command line is unacceptable, as things on a handheld device need to be finger-friendly.

With that in mind I wrote a small graphical utility to launch GPRS on FSO based distributions. The tool makes use of Gtkdialog, which wasn’t in the SHR repositories, so I had to build the ipk as well: gtkdialog-0.7.9_0.1_armv4t.ipk.

At one point I had 4 different applications accessing the Internet at once: a browser surfing the web, an active chat via Pidgin, a terminal with an SSH session to a remote host, and tangoGPS downloading map tiles. Granted, none of it was super fast; GPRS is old, slow technology, but it’s still usable for many things. And over all that I was still able to receive a phone call. Things are getting better by the day for Openmoko Neo owners, but there is still a way to go.