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.

Nicer HTML Forms in Less Time September 7th, 2009

We just discovered JotForm – an online tool for making and editing HTML forms. Most of the abstractions we have for forms are on the back-end, so we end up writing boring form code manually. Not anymore. Now we can create nice looking forms during development!

Santiance.com is finally back September 5th, 2009

We’ve been working on another domain, which I won’t be putting in this article since it should be forgotten and never used again. Welcome to santiance.com! It’s an exciting time as we’re working with a lot of different developers and clients with unique visions, and we’ve also got our own projects in the works.

Our team has changed over the last year, and now consists of:

  • Kris (backend, and sadly some frontend)
  • Alex (backend and frontend)
  • Steven (frontend and graphics)
  • Ed (backend)
  • Tim (nerd)

We’ll all be getting our e-mail addresses and personal blogs setup over the next few weeks. Now is a good time to explain some of the different projects we’re all working on:

  • Twig is a very lightweight collaborative PHP framework.
  • newlists.info makes State information freely available to the public without strings attached.
  • mugendb.org is a network for the 2D online GNUGEN open source fighting game.
  • worldeditor.org is a place for information about making third party game modifications.
  • Diet HTTP is a widget that serves your stylesheet and Javascript files to optimize page load time.

So, we’ll be pretty busy!

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: