1. NAT-safe IPv6 Tunnel from Mac OS X to Linux Server

    Here is how I routed myself a block of IPv6 to my laptop, wherever I am in the world! Note that I deliberately route myself an entire /64, but only allow a /128 through tinc (to reduce the amount of junk I might drown in). It should be relatively trivial to swap addresses if necessary in future.

    Mac OS X Laptop

    tinc.conf

    Name = laptop
    ConnectTo = server
    DeviceType = tun
    Mode = router
    

    tinc-up

    #!/bin/sh
    ifconfig $INTERFACE up
    ifconfig $INTERFACE inet6 add 2001:0db8:1234:5678:cafe:babe:feed:face prefixlen 64
    route add -inet6 2001:0db8:1234:5600::1 -prefixlen 56 -iface $INTERFACE
    route add -inet6 :: -prefixlen 0 2001:0db8:1234:5600::1
    

    tinc-down

    #!/bin/sh
    route delete -inet6 :: -prefixlen 0
    route delete -inet6 2001:0db8:1234:5678:: -prefixlen 64
    route delete -inet6 2001:0db8:1234:5678:cafe:babe:feed:face
    ifconfig $INTERFACE inet6 delete 2001:0db8:1234:5678:cafe:babe:feed:face prefixlen 64
    ifconfig $INTERFACE down
    

    ~/bin/ipv6

    #!/bin/sh
    sudo /opt/local/sbin/tincd -D -c ~/.tinc
    

    Debian Linux Server

    nets.boot

    tunnel-5600
    

    tunnel-5600/tinc.conf

    Name = server
    DeviceType = tun
    Mode = router
    Subnet = 0:0:0:0:0:0:0:0/0
    

    tunnel-5600/tinc-up

    #!/bin/sh
    ip addr add 2001:0db8:1234:5600::1/56 dev $INTERFACE
    ip link set $INTERFACE up
    

    tunnel-5600/tinc-down

    #!/bin/sh
    ip addr del 2001:0db8:1234:5600::1/56 dev $INTERFACE
    ip link set $INTERFACE down
    

    Common

    hosts/laptop

    Subnet = 2001:0db8:1234:5678:cafe:babe:feed:face/128
    -----BEGIN RSA PUBLIC KEY-----
    SNIP
    -----END RSA PUBLIC KEY-----
    

    hosts/server

    Address = 192.168.1.1
    Subnet = 0:0:0:0:0:0:0:0/0
    
    -----BEGIN RSA PUBLIC KEY-----
    SNIP
    -----END RSA PUBLIC KEY-----
    
    Notes
    Comments (View)
  2. Compression Algorithms: an argument for energy efficiency

    There’s been a lot of talk both recently and in years passed about LZMA compression. With any compression algorithm come benchmarks and these are often in the form of compression-rate, decompression-rate and compression-ratio:

    compression rate
    Basically this is “less time spent waiting for the compressed output to be generated”. Where data must be sent real-time, or where the compression process adds latency or reduces the bandwidth of transmitting data, a higher compression rate is desired.
    decompression rate
    Having received a copy of the compressed data, a higher decompression rate is “less time spent waiting for the original output to be generated”. This can be important where mobile devices are decompressing data (e.g. streamed video) so that less CPU power is used.
    compression ratio
    How much smaller is the compressed file? The higher the ratio the “better” the algorithm, but not all algorithms perform equally on all sorts of data. Specialist algorithms tailored to the kinds of data being crunched are common (for example, lossless audio compression algorithms tend to outperform general compression algorithms in their niche).

    I remember the gradual change from gzip compression to bzip2 which started to happen at the end of the 1990s and continued at the start of the 2000s. Back then I had a Pentium-II 333MHz as my main workstation and a 10Mbit university-provided Internet connection. Sometimes it would be quicker to download a larger gzip file than wait for the much slower bzip2 algorithm to complete its decompression. Today things are much the same: running Faelix means I have much more Internet bandwidth at my disposal than I could need for getting files, but CPU speeds are that much quicker that I’d now consider the bzip2 file over the gzip.

    However, my position as a content provider (the owner of an ISP) and the asymmetric nature of the CPU costs of LZMA have changed my thinking on this subject. LZMA achieves better compression, typically, than bzip2 or gzip but is much slower to compress data than either of them. However, LZMA might be very slow to compress but it is much faster than bzip2 when decompressing data. This leads to the question, “Why do we compress data?”

    • smaller storage requirements
    • smaller transport requirements

    The benefits this brings:

    • lower cost of storage
    • possibly leads to lower energy consumption for storage
    • lower cost of transport
    • transport of data across communications links will take less time
    • better use of capacity of existing communications links (more customers served)
    • possibly leads to lower energy consumption for transmission of data

    An algorithm with better compression will have lower transport/storage costs. Assuming that an algorithm which is fast under decompression uses fewer instructions per bit of decompressed data output, a faster decompression is also more “ecologically sound”. This is a bit of a hand-waving argument now, but I’m curious enough that I may experiment and confirm this hypothesis with actual data. In the use case of one large, pre-compressed file being made available to a large number of users, LZMA would appear to be a strong contender to replace bzip2 or gzip when ranked with a benchmark of “energy efficiency”:

    • compression, though slow (therefore assumed to be energy-costly), is a one-time operation
    • transmission is smaller, and is a per-user operation
    • depression is fast (therefore assumed to be more energy-efficient), and is a per-user operation

    Research to follow, I think…

    Notes
    Comments (View)
  3. Xen Virtual Server Upgrade at Faelix

    faelix:

    Dear Xen Virtual Server Customers,

    On Tuesday next week Faelix expects to receive delivery of thirty servers to massively upgrade existing hosting arrangements across our two data-centres, and plan our expansion into the third and beyond. They say “there’s no such thing as a free lunch”, but Faelix will be giving free upgrades to our valued existing customers: the only thing you’ll notice is that your sites and services run even faster!

    By the end of next week we should have completed load-testing the new equipment. Over the weekend of 6th-7th June we’ll begin commissioning the new equipment in our data-centres, and our plan is to be in a position to migrate your virtual servers onto the newer, faster hardware over the weekend of 13th-14th June. Of course I’ll be in touch with you closer to the time to ensure that work can be carried out at a convenient time to minimise disruption to you.

    If you’ve any questions or concerns, please don’t hesitate to get in touch.

    Notes
    Comments (View)
  4. The weekend of February 14th is going to be our tentative target for release.
    0 notes
    Comments (View)