Open Library

Nora, for complicated reasons, made a list of about 120 or so ISBN numbers of books we have here in the house. Having this list in an Exel Spreadsheet was burning a hole in my pocket so I starting writing up some code to try to do something with this.

Tcp Latency

This was the remedy for high latency connections to my ubuntu server. After doing this RTT dropped from average of a good couple hundred ms down to 1 to 2 ms.

# echo 1 > /proc/sys/net/ipv4/tcp_low_latency
# echo 1 > /proc/sys/net/ipv4/tcp_sack
# echo 1 > /proc/sys/net/ipv4/tcp_timestamps
# echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

and once latency went down I did this to get it to stick across reboots:

# echo 'net.ipv4.tcp_low_latency = 1' >> /etc/sysctl.conf
# echo 'net.ipv4.tcp_window_scaling = 1' >> /etc/sysctl.conf
# echo 'net.ipv4.tcp_timestamps = 1' >> /etc/sysctl.conf
# echo 'net.ipv4.tcp_sack = 1' >> /etc/sysctl.conf

UPDATE

So the latency came back a little while later and reappying these commands again might have brough some relief but the latency kept jumping back up. After swapping the network cable things seem to hovering at a brisk 1ms. Lesson learned: It’s not always your configuration.

Latency drop

Zmq: Zero MQ Post

Finally got to installing zmq on ubunutu today.

I found a suggestion to add someone’s repo to apt but there was some sort of build error when I tried to install these so I opted to build from source.

wget http://download.zeromq.org/zeromq-2.1.11.tar.gz
./configure --with-pgm
make
sudo make install

There are a few other languages that zmq supports but this is enough to get me started.

Built language support for python

sudo apt-get install python-dev
sudo easy_install pyzmq

and php

sudo apt-get install php-pear
sudo pear channel-discover pear.zero.mq
sudo pecl install zero.mq/zmq-beta 

and ruby

# I use rvm so don't sudo gem
gem install zmq

and perl

sudo apt-get install libperl-dev
cpan ZeroMQ

which turned into a yak hunt as I hadn’t get up cpan before. cpan install YAML

TODO: Build something with zmq!

First Post

This is the first post in my explorations of Octopress.

Flying is learning how to throw yourself at the ground and miss.

Douglas Adams The Hichhikers Guide to the Galaxy

Watch out ground.