Subversion upgrades

Another nugget that took me a few minutes to go through, so a summary here: when upgrading subversion environments, you need to consider:

  • The version of the client tools (eg, svn from the command line, Tortoise, Subclipse, etc)
  • The version of the binaries in the web server (libapache-svn)
  • The version of the repository on disk

The repository on the server on disk generally does not auto-upgrade. Indeed, I just found that my personal SVN repo was still using format version 1! Version 1.4 uses format 2, and version 1.5 uses format 3. Thanks to this link its easy to see the format of a repo – cat $PATH/db/format.

Check the release notes to see the features that don’t work when the repo is not upgraded, and what version clients do and don’t work.

How to convert IPv4 to IPv6 in MySQL

If you original IPv4 address is in an unsigned long called “IPv4“, then…

select concat("0:0:0:0:0:0:", LPAD(CONV(substring_index(inet_ntoa(IPv4), '.', 1), 10, 16), 2, "0"), LPAD(CONV(SUBSTRING_INDEX(SUBSTRING_INDEX( inet_ntoa(IPv4) , '.', 2 ),'.',-1), 10, 16), 2, "0"), ":", LPAD(CONV(SUBSTRING_INDEX(SUBSTRING_INDEX( inet_ntoa(IPv4) , '.', 3 ),'.',-1), 10, 16), 2, "0"), LPAD(CONV(SUBSTRING_INDEX(SUBSTRING_INDEX( inet_ntoa(IPv4) , '.', 4 ),'.',-1), 10, 16), 2, "0")) as IPv6 from Log3NF.Access limit 1000;

Log3NF – IPv6 support coming real soon

A few years ago, I converted my earlier idea of logging Apache request to 3rd normal form into a fully fledged Mod Perl 2.0 Log Handler – embedding this into Apache. Its essentially a very simple Handler of less than 60 lines, and a stored procedure inside MySQL that normalises the data. Its been running on my personal server since February 2009, and in that time its collected around

  • 1.4 million hits
  • 27,000 unique useragents
  • 57,000 unique paths
  • 9 basic authentiation users
  • 13 HTTP methods
  • 50,000 unique referrer URLs
  • 13 HTTP Status
  • Recorded the transfer of 192,185.9637 Megabytes of (body) data; the average body response is 144 KB.

Wow. The log data on disk is 574 MB, or around 410 bytes per request – including the indexes (this is the size of the MySQL directory containing the data).

All well and good. Now time to get it fit for IPv6, and then improve the reporting. The reporting has two phases:

  • Live reporting from the 3rd normal form for data covering the last few seconds/minutes/hours/days.
  • Summary reporting per day or per month, per statistic, pre-calculated

Anyway, we’re about to pull in IPv6, again storing this as efficiently as possible, and then improve the currently very basi reporting interface…. stay tuned… and see the SVN repository for code…

Now with IPv6 goodness

So, with about 10 mins of reading and 1 min of work, this site is now available with both IPv4 and IPv6. Thanks Bytemark for making it so easy, and of course to all the software stack that just works. If you want to test and ensure you’re using just IPv6, you can browse to ipv6.james.rcpt.to, which I have only published a AAAA address for.

Next up; update my Log3NF Apache module to understand IPv6 addresses as well as the IPv4 if currently does.

O2: don’t call me to tell me to stop using an unlimited broadband!

Dear O2 Broadband,

I’ve been a customer now for about 3 months. In this time I have experienced:

  1. Spontaneous reboots of the O2 broadband wireless router every 30 seconds, forcing me to put my own router in; support forums are full of plenty of people talking about this
  2. Very slow Speedtest.net speed results of around 1 MB/sec on an 8 MB/sec line in the evenings; I live around 300′ from the Poplar, London exchange (that’s the copper run, not line of site)

Now you’ve rung me to tell me to use my broadband less. Now, I’m familiar with fair usage, but quite frankly, the poor performance of the service is enough to throttle any usage.

So, here’s a couple of tips:

  • Work out how you can not suck badly in the evenings. Ther’s supposed to be a 21CN upgrade from BT for this exchange in the Q2 2010; get some of that roadmap out and publicised as to what this means for your customers? Anything? Nothing?
  • Accept that you have a bad fimware on your routers. Confirm it as a known issue. Apologise for this. Advise people of workarounds. Stop using these crappy Thompson devices. You choose, just don’t keep burrying your heads in the sand.
  • Don’t hassle your customers for using the service they are paying for. You say Unlimited. You say “No matter which O2 Home Broadband package you’re on, there aren’t any limits on how much you can download or upload in a month. So you can use the Internet as much as you like, within reason. Our network’s been designed to cope with people downloading large files (like music or films) and watching video online. But if you’re using the service excessively – like continually downloading large files at peak times – then we do reserve the right to warn you to lower your usage. In exceptional circumstances, we can even terminate your account. This is because excessive use by a few people can reduce the speed that others in the same area get with O2 Home Broadband. We just want to provide everyone with an excellent level of service.” I am not on a 100 MB/s fibre link here, its an ADSL link. It is limited already at… well, you say 8 MB/sec, I see 1 MB/sec. That’s enough of a limit already. Indeed, for central london, E14, less than a mile from some of the biggest internet exchanges in the United Kingdom, how about you actually get some performance in here.

You suggested to me that you may terminate my account; well, you’re offering has performed pretty poorly, so I am tempted to leave anyway.