Skate 3

Duncan has been watching a Youtuber play Skate 3 off and on for several months now, and mentions wanting it every so often. That's not a problem, I thoroughly enjoyed the first one and I'd totally play it too... only issue is, it's horrifically expensive for such an old game. EB want close to $30AUD for a pre-owned copy, on either system!

On Friday though, I noticed an ad on our local Facebook buy/swap/sell group (one of the only things I really use FB for) of a pile of Xbox360 games for $10 each. Skate 3 was in there, along with Forza 4 and Fable II, two other games I'd been wanting to play but not enough to buy (even with EB's buy-one-get-one deal they had a while back). Today, I got around to writing the seller a message, asking if she'd take $20 for three of them, and she replied yes.

That's less than seven bucks per game, and well below my pain threshold, so I made arrangements to go pick them up. It turned out I'd been there before: it's the same lady I bought the Playstation 2 from a couple months ago. All three games are in great shape, and I believe complete, so I'm pretty happy.

I had to work shortly after picking them up, but Duncan spent a good amount of time thoroughly enjoying Skate 3 that I dare say he's got our money's worth out of it already.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry

Drive-in, again!

I didn't write about the last one, but this would be our third year attending the drive-in movie at the Horsham Showgrounds. The first year was in May, then last year I believe was closer to October (we saw Zootopia), and now tonight we saw Despicable Me 3. Each time the drive-in comes around it's to support some sort of cause, what the others were escapes me but tonight was Duncan's primary school.

We opted to, as usual, buy dinner then arrive early to ensure a good spot. This almost worked too well, as this time we were right in front of the screen (off from the center by one car), but this meant (or perhaps the owners of the movie company saw my previous complaint about the screen being too low and raised it) that the screen was too high unless I laid my seat well back, and certainly Duncan couldn't see from the back seat, but he sat on Sabriena's lap anyway.

We also bought popcorn, and I bought a sausage in bread because it was a buck and had onions. We forgot to bring water, so we bought a couple of those as well, but it's all for fundraising and we spent less than $40 total for the entire night out, so compared to what a trip to the theatre costs, I can't really complain.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

The Great CloudFlare Experiment

A while back, I was toying with the idea of switching my site from AWS' Cloudfront to CloudFlare. Cloudfront itself is pretty great, but it requires (for my usage, and at the time I set it up, anyway) my domain to be hosted on AWS' Route53, which basically quadruples the amount of money the site costs to host - up to a whopping ~70c USD/month. By exploiting CloudFlare's free plan, I could slash that back down, and probably further (since a fair bit of my content almost never changes, so I could exploit very long edge-cache times and cut down on S3 requests as well). Since my router can use CloudFlare for dynamic DNS as well, I basically had nothing to lose by trying it.

Nothing except 200~400ms it seems.

I don't care enough to change it back, but the TTFB on CloudFlare, even on cache hits, is quite high. I'm not sure if the paid plan brings that down (I would understand if free plan clients were given a lower priority or something), but the TTFB of cache-hits can sometimes be as high as 600ms. That's pretty high for a short batch of static HTML, and I'm quite sure Cloudfront was never that slow.

Do I care? Well no, not really. My site is still - all things considered - lightning fast, with Pingdom claiming that from the USA, my site is "Faster than 98% of tested sites", and the primary thing holding me back from a total page load time of under a second in almost all cases is Google Maps' static API, not anything on my domain. The other thing holding me back, in general, is images I host at Imgur, Flickr, and elsewhere.

Since storage from S3 is relatively cheap and I can again abuse Cloudflare's (albeit limited, on free plans) Page Rules to set really log edge cache times, I might wind up self-hosting all my images and possibly even the Google Maps images (since I really only use a handful of different locations and they more or less are completely static). It's utterly hilarious to me that self-hosting images is the fast option, I've avoided doing that since the days of 10 and 100mbps server connections, because hosting high-res photos tears through bandwidth. CDNs have really changed things, haven't they?

Self-caching Google's map images will present it's own set of problems - not the least of which I imagine could be copyright, I'll have to check whether that's even okay. Once that problem's solved, the other will be actually doing it, I suspect I'll have to get my hands dirty and write a Pelican module to do it for me.

Anyway, I think while it's grossly more expensive for my use case, I have to begrudgingly admit that AWS's Cloudfront is a slightly better product than Cloudflare's free offering (is that such a surprise, really?). I'll stick with CloudFlare for the time being as it does the job well.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

Monitoring a Netgear DM200

After a bit of stuffing about, I got our connection mostly set up how I want it: the modem (a DM200) is setup in a dumb-modem configuration. The pfSense box (A PC Engines APU) picks up the WAN IP via DHCP (so no more double-NAT), but our DHCP client is also configured to add an alias for the RFC1918 address in the same subnet as the router configuration. Changing the DHCP client was fun - I thought I'd broken something, so I kept messing with it, but it seems that AussieBB's DHCP server will happily hand out your IP address to any DHCP client MAC that requests it, but will only actually send traffic to the new MAC after a delay of around ten minutes. So it worked first go, and I destroyed my pfSense configuration trying to work out why it wasn't working, for no damned reason.

Anyway, after adding a simple NAT rule:

nat on $WAN  from 10.0.0.0/8 to 172.16.0.0/24 -> 172.16.0.2/32 port 1024:65535

and we're able to access the router from inside the LAN anyway. This means that I can inspect things like the DSL line stats (though not much else, because in modem-only mode the DM200 has next to no configuration). So I knocked together a little script in PHP (ugh, I hate PHP so much, and I had to use PHP5.6 to boot because I can't find any RRD modules for 7) to poll the router's status page and dump it to an RRD:

<?php

# Configuration
$r_ip = '192.168.0.1';
$r_un = 'admin';
$r_pw = 'password';
$rrd_db = '/home/fwaggle/router_stats.rrd';

# Values to fetch from the router and the types to store them as in RRD
$values = array(
    'conn_down' => 'GAUGE',
    'conn_up' => 'GAUGE',
    'line_down' => 'GAUGE',
    'line_up' => 'GAUGE',
    'noise_down' => 'GAUGE',
    'noise_up' => 'GAUGE',
#    'lan_txpkts' => 'COUNTER', # these don't seem
#    'lan_rxpkts' => 'COUNTER'  # like they work...
);

# Now fetch the values from the router.
$ch = curl_init("http://$r_ip/RST_statistic.htm");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$headers = array(
    'Content-Type:application/json',
    'Authorization: Basic '. base64_encode("$r_un:$r_pw")
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$page = curl_exec($ch);
curl_close($ch);

# Basically grep the resulting HTML file for our desired values.
preg_match_all('/var (.+)="(.+)"/', $page, $matches);
foreach ($matches[1] as $key => $value)
{
    # All values start out stuffed as-is
    $router[$value] = $matches[2][$key];

    # translate bps values
    if (in_array($value, array('conn_down', 'conn_up')))
    {
        preg_match('/([0-9\.]+) ([A-Z])bps/', $router[$value], $m);
        $v = floatval($m[1]);
        switch ($m[2]) {
            case 'G': # optimistic?
                $v = $v * 1000.0;
            case 'M':
                $v = $v * 1000.0;
            case 'K':
                $v = $v * 1000.0;
        }
        if ($v > 0)
            $router[$value] = $v;
    }

    # translate dB values
    if (in_array($value, array('line_down', 'line_up', 'noise_down', 'noise_up')))
    {
        preg_match('/([0-9\.]+) dB/', $router[$value], $m);
        $v = floatval($m[1]);
        if ($v > 0)
            $router[$value] = $v;
    }   
}

# If the RRD doesn't exist, we're going to create it.
$rrd_sources = array();
foreach ($values as $key =>$value)
{
    $rrd_sources[] = "DS:$key:$value:300:0:U";
}

$rrd_settings = array_merge($rrd_sources, array(
    "--step", "60",
    "RRA:MIN:0:360:576",
    "RRA:MIN:0:30:576",
    "RRA:MIN:0:7:576",
    "RRA:AVERAGE:0:360:576",
    "RRA:AVERAGE:0:30:576",
    "RRA:AVERAGE:0:7:576",
    "RRA:AVERAGE:0:1:576",
    "RRA:MAX:0:360:576",
    "RRA:MAX:0:30:576",
    "RRA:MAX:0:7:576"
    ));

if (!file_exists($rrd_db)) {
    print("Creating database...\n");
    $status = rrd_create($rrd_db, $rrd_settings);
    if (!$status)
        die ("Failure creating database!\n");
}

# Do RRD update.
$rrd_data ="N";
foreach ($values as $key =>$value)
{
    $rrd_data = $rrd_data . ":$router[$key]";
}

$status = rrd_update($rrd_db, array($rrd_data));
if (!$status) die("Failure updating RRD!\n");

It's ugly, but it mostly works. Stuffed it in a cron job and came back a couple days later to draw some graphs, and the results make me want to call support even more (I reset the modem shortly after the script started running):

VDSL Sync Speed Graph - ~48 hours

That's rather disappointing - the 2:1 ratio between downstream and upstream is nice, but it's a significant hit to what we should be able to achieve considering how close we are to the node. Seriously bitter for my country's federal government's piss-poor handling of what should have been a nation-building project.

Update: I called AussieBB's support, as this morning the sync rate for the downstream had dropped to about 31mbps - a proper 2:1 ratio - and they were busy so I pressed the # key to leave a callback message. They got back to me less than 5 hours later, and I was pleasantly surprised how prepared they were before calling. Ran some line tests with the modem disconnected, and it seems it's unlikely I'm actually connected to the node that's next door - if I am, then our loop must go a fair distance around the block before reaching it. Awesome.

I sent them the last few days' graphs, but I'm not too optimistic they're able to do much from their end. Very impressed with their service so far - it's just the NBN in general that's really disappointing.

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry