Linux TCP Settings for Comcast & Using ionice September 29th, 2009

It’s been mailed and blogged about to death, but I’ll explain how to increase you TCP performance for usage on a laptop or notebook that will having heavy bandwidth usage. With a common cable provider and wireless device ratings these days you can get about 2 MB/sec connections. However, it’s unlikely you’ll find many HTTP servers that are willing to give you that much bandwidth in a single connection, but BitTorrent (and possibly zysnc, jigdo, and other distribution systems) may make heavy interchange between many servers sending a lot of TCP packets.

The default configurations for TCP in Ubuntu and Debian are good, but they aren’t profiled to meat your specific connection. Last I checked I believe they are defaulted to a DSL-like connection, which is probably somewhere in the middle-ground between dial-up and high performance broadband. Here are some simple additions you can make to your /etc/sysctl.conf file (as root):

net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1

The easiest way to make these configuration changes and apply them is to press ALT+F2 and run gksudo gedit /etc/sysctl.conf (you can copy and paste that), which will open up the text editor. Paste the above changes at the end of the file, save, and exit. Now press ALT+F2 again and enter gksudo sysctl -p to apply these changes. If you want to see what these commands are doing you’ll have to press the Run in Terminal button instead of just Run.

Another trick is using ionice to give different processes more priority on reading and writing to your file system. A good example is the Transmission torrent client, which I prefer to run in the background most of the time. You have to get the Process ID (PID) by using the System Monitor, which can be ran from the Administration menu or by pressing ALT+F2 gnome-system-monitor. Go to the process list and find the name of the program (transmission in this example), copy the PID, and then press ALT+F2 gksudo ionice -c 3 -p 1234 where 1234 is instead the PID. I used 3 here to make it use Idle scheduling, but you can use 1, 2, and 3 for varying degrees. See man ionice for how that works in detail.

Ubuntu 9.10 to Drop Pidgin Instant Messenger September 1st, 2009

Pidgin saying GoodbyeIt’s interesting to see what’s happening with the latest Ubuntu (9.10, Karmic Koala), which is in Alpha 4 of testing. Firstly, I would like to point out that I think the releases are getting slightly worse as of recent, which may be partly due to the economic crisis and lack of good developers being fully committed.

The features page is getting a little bit embarrassing with things like kernel updates, driver updates, and other under-the-hood changes that have been made. Compare that with a release 2 years ago (Hardy) and you’ll see many more features that impact the user, instead of what we’re getting now which are meta features.

We all love how Linux is flexible, and with Debian we can add and remove packages as our hearts desire. Ubuntu has made Empathy replace Pidgin in the upcoming release. Is this the best way to be spending our time? There are so many things that are more critical than changing the default Instant Messaging client, like:

Tricks with Chromium on Linux August 15th, 2009

Google Chrome for Linux isn’t out yet, but for the meantime the Open Source Chromium project is doing some nice things. Oh, and it’s really fast too.

If you man chromium-browser, assuming you’ve already installed it from the PPA, then you may be tricked into thinking it has no options. I’ve only messed with a few, but they wern’t documented.

Creating an Incognito Launcher

Chromium Incognito IconThere is a --incogntio option that you can use, but as far as I can tell there is no icon. I’ve done some slight modifications to the icon and you can download that to your desktop and run sudo cp ~/Desktop/chromium-browser-incognito.png /usr/share/pixmaps/ and create a launcher (or download mine).

Opening a page as an Application

Chrome has the idea of making some pages work more like applications. For example they can just have the native window theme borders and no other doodads.

The launcher needs to use chromium-browser --app http://pandora.com, for example to open Pandora.