Apache’s transfer speeds

Being away from home, I’m downloading programmes recorded by the HTPC over the internet. I set up a batch file that uses WGET to retrieve the compressed WMVs that get created from recorded programmes. Its the same Apache server thats serving this blog.

Even though my uplink is 256kb (30KB), I’m very disappointed to only get about 12KB/s using wget. I’ve also tried direct downloads in Firefox, same thing.

If I use PHP File Manager instead though, I achieve 26KB per second. Unfortunately I cant automate this method easily.

So it seems Apache is being very conservative with its use of the link.

I thought it might have something to do with the long latency from Korea to Australia (nearly 400ms) so I tried increasing the receive window size, right up to 87600. This is supposed to reduce the frequency of ACKs and improve things over a high latency link. Didn’t help.

I’m guessing that Apache is doing some kind of connection load balancing which is annoying. Might be interacting with Windows XP’s QoS packet scheduler. Dont want to mess with that remotely at this stage; some connectivity is better than none… if I kill the network interface,

SIP phone fun

Wanted a local dial in number that would ring on my laptop. Went with Pennytel as their untimed international calls (8c) sounded good. Getting it to work ended up being much harder than it should have and took $20 of landline calls to my DID number.

The basic problem was that my outgoing audio was not heard by a caller to my DID number. It wasn’t a port problem nor an audio hardware problem; the voicemail system could hear me fine, (determined after a lot of wasted calls).

Their tech support guy was responsive and I went through the process of trying a number of SIP clients (he preferred X-Lite) on a couple of XP computers with different audio hardware.

A couple of colleagues had the same problem under XP but one got it working on a hardware SIP phone. I tried a complete WinXP reinstall. No dice, even with a totally fresh install.
Finally had a breakthrough when I discovered it worked fine on my Win2K computers. This eliminated a local network/router/ISP problem.
I used Ethereal to capture packets during a test call; data was flowing in both directions. Sent the data to Pennytel and their tech support (Antony) came back with the solution; try with just the G711 ALaw codec enabled. I tried this in Bria and it came good. Seems something in XP breaks that codec when using it with Pennytel!  You’d think they would have known about this.

EDIT April 2009: Nearly 2 years later and I’ve been using Pennytel using my SPA3102 ATA. Now I’m wanting to have Bria available on my laptop again. I installed version 2.5, the very latest and again had outgoing audio problems on incoming PT calls.

Using settings->Audio Codecs I just left G711-alaw in there but it didn’t help. Then I checked the “when negotiating audio codecs, accept the first codec offered”. Its all good now.

Telephone Switcher


Component side

Soldering SideWhen I travel I thought it’d be good to have a way to remotely reset/reboot the HTPC and the ADSL router. The HTPC is on a UPS but the router isn’t, which probably explains why the router’s locked up a couple of times after the lights have flickered here. Living on a site with houses still being constructed, who knows what can happen.

I bought and built the K140 telephone switcher kit from www.ozitronics.com

You connect it to a standard phone outlet and it lets you dial into it and turn relays on and off using simple commands on your phone keypad. I’ve connected one relay accoss the power button of the HTPC, rather than the reset switch. This lets me switch it completely off and on again (which might be useful if we have a long power failure while I’m away).

Switcher in use

I’ve now got the second relay in series with the low voltage side of the router’s power brick (using the normally closed relay contact) so I can also power cycle the router if it becomes non responsive. With it now on the UPS, hopefully this wont be needed very often 🙂

Up and away

My HTPCWell, got this blog up and going. Its running on my home theatre PC, a Pentium 4 3GHz with 1GB of RAM.

The HTPC has a couple of TV tuner cards and runs DVB Webscheduler. I’ve set up a couple of scripts to convert recorded programs into WMV files which I can then download over the net when I’m travelling.

Here’s a page on the HTPC which I wrote when I built it.