FreeBSD 10 performance

Software

The move from GCC to Clang was arguably the biggest change going to FreeBSD 10. Wrote this in response to what I now realise is a troll site. Oh well.

FreeBSD were stuck between a rock and a hard place with this. They could continue to use the last increasingly outdated non-GPL3 GCC, or take the performance hit and move to Clang. I think we can all emphathise with their decision.

In the meantime, I’ve moved all my boxes and cloud instances to FreeBSD 10 under various loads (DB servers, web servers, file stores) and haven’t seen any noticeable performance penalty. That said, I haven’t done any serious benchmarking, and FreeBSD’s natively better performance than GNU/Linux under similar loads on my hardware has somewhat masked this. As a Xen guest, its native kernel PVHVM drivers have also significantly increased practical performance.

With Apple’s backing, Clang/LLVM binaries could eventually become competitive with GCC. Indications are they’re slowly moving in the right direction, if the Phoronix Test Suite benchmarks are to be believed.


The Bic Orange Finepoint most certainly is

Hardware

I used to joke that the only time I use pens is for exams and immigration cards. As everyone has their favourite instrument for expressing themselves, mine is a computer keyboard and markup. So when I can find a pen that gets out of the way and writes with a minimum of fuss and cost, I latch onto it.

Of all the ink types and brands available, I keep coming back to the Bic Orange Finepoint, as held by our orange–haired mahou shoujo Mai above.

Some markets list them as the Bic Classic Fine, or the Bic Orange Ballpen, or mistakently as the Bic Crystal.

Whatever they’re called, the Orange Finepoints are sturdy, draw incredibly smooth lines without smudgeworthy gel inks, and are available everywhere for cheap. They’re also bright orange, which makes them easier for absentminded people like me to spot.

Jony Ive spent a large amount of time when introducing the MacBook talking about the “perfect coefficient of friction” for their glass trackpads. These pens are almost the same to paper.

A variant is the famous Bic Cristal [sic], which is the same but with a transparent shell. You can see the remaining ink with those, but I just like the feel of these more.


Scotland 2014

Thoughts

Clan Ross

My mum and I had a tradition on Friday evenings; we’d either watch true crime shows on Discovery Channel, or reruns of Highlander with the dashingly hot, Scottish immortal played by Adrian Paul. No really, look him up.

Some of the episodes were rather dark, but the one we’d always go back to was the “Stone of Scone” episode. In it, Duncan MacLeod and his partner in crime Amanda plotted a scheme to steal this priceless relic of Scottish history from Westminster Abbey. The English had stolen it, and with it a part of Scottish sovereignty. Hilarity ensues, with the stone eventually being deposited on a misty Scottish moor, unbeknownst to the golfers playing nearby or the hoodwinked Abbey security guards.

There are some conspiracy theorists who believe this really happened, and that the stone in Westminster was always just a convincing replica. I like to pretend this was true, too.

It’s emblematic of so much Scottish identity since the Acts of Union in 1707.

I look no good in kilts

Much of my mum’s family hail from Clan Ross from Inverness in the Scottish Highlands. The featured image is of our clan’s tartan; pretty handsome, am I right? My grandfather has spent a great deal of time researching the family history, including creating a detailed family tree going back generations. I imagine many of us living in former British colonies can trace similar lineage.

It amazes me such a tiny county with relatively few people could have such an impact on the world. Their romantic (and otherwise!) music, their scientists and engineers, the best breakfast food in the world… not even the Romans could conquer them!

(An adage my grandfather loves, and Alton Brown quipped on an episode of Good Eats goes something like this. An Englishman poked fun at a Scot for his love of oats. We feed that to our horses, he cried! To which the Scot replied: that’s why in England you raise fine horses, and in Scotland we raise fine people).

On the 18th of September, Scottish people will be voting on a referendum for independence from the United Kingdom. It's historic in a global context; the next part to fall away from the once globally reaching empire where the sun never set.

It also brings some practical considerations. Will they model themselves on, say, the Irish Republic? Will they use the British Pound, their own Pound, or the Euro? For that matter, will they be a part of the Eurozone? What about businesses operating on both sides of Hadrian's Wall? Will they keep The Queen, or elect their own head of state? Will the English arrange to keep some of Scotland's vast natural resource reserves in the North Sea?

Elsewhere, will this embolden those in Catalonia, or Kurdistan? What will happen to countries like Fiji, Australia or New Zealand that continue to wear colonial hand-me-downs on their flags?

Whatever happens, I'll be watching closely, and channeling my mum and all our proud ancestors in saying yes :).


Disable moused on a FreeBSD Xen guest

Software

I run FreeBSD instances on a cloud running Xen. Compared to the Linux instances, it performs better with less memory and has a better mascot, surprising nobody.

Looking through memory usage though, I saw this:

653 root 1 20 0 16628K 1940K select 0:00 0.00% moused    

I have a mouse, on a cloud instance? Sure enough, grepping dmesg:

ums0 <Endpoint1 Interrupt Pipe> on usbus0
ums0: 3 buttons and [Z] coordinates ID=0

From what I can tell, the hypervisor this instance is running on provides the default Xen USB mouse. This makes sense, after all you can run Windows instances or X11. FreeBSD detected this, and loaded moused.

Interestingly, adding the following to /etc/rc.conf had no effect:

echo moused_enable="NO"

This post on geektivities had the answer, by specifying the interface:

moused_ums0_enable="NO"

Now the mouse doesn't load and use memory, however small that may have been. If you don't need it, may as well not load it.


Choosing a keyboard for gaming and typing

Hardware

For those with the money, desk space and a desire for mechanical keyboards, it would make sense to get seperate keyboards for gaming and regular typing. For the rest of us, we have to compromise on a keyboard that will give us solid performance in both.

Why switched keyboards are awesome

Firstly, I’m not a gamer in anything but the Siracusian “I play some casual games, therefore I’m a gamer” definition. I don’t need a keyboard that allows me to rapidly hit the same key multiple times, or do any complex combinations. I don’t play FPS games, and I don’t use Emacs (oh, snap)!

To understand what’s best for gamers and Emacs users who require this, you need to know the steps involved in typing something:

  1. You press a key

  2. As you move the key down, the computer registers the key was pressed. This is the actuation point.

  3. If you keep moving down till the key can’t travel further, you’ve bottomed out the key.

  4. As you lift your finger back up, the key should snap back up as quickly as possible, ready for the next keystroke.

If you’ve only used cheap keyboards, steps 2 and 3 may seem the same. In which case, you’re in for a surprise :).

Membrane keyboards and most laptop scissor keyboards require you press keys all the way down for the keystroke to be registered, and have a greater delay between when a key is pressed and when it returns back up. Good quality, mechanical keyboards will register the keystroke even if you’ve only pressed the key someway down.

Why is this important? For gamers, it allows for more rapid keystrokes by reducing the distance. It also greatly reduces strain compared to bottoming out keys, as the springs absorb the impact of your keystrokes instead of your fingers.

Mechanical keyboard types

There are dozens of types, but the following are the most common.

  • Buckling spring keyboards are noisy as all outdoors, but they have a loyal following. My home workhorse is a Unicomp Spacesaver, made from the same machines thht made the original IBM Model M. They feel amazing for typing, but the force required to actuate wouldn’t make them great for gaming.

  • Alps make black and white switches, for clicky and bumpy keyboards respectively. The original Apple Extended keyboard used these, and people like Gruber swear by them. Unfortunately, they’re hard to find, and I’ve read that their quality has dipped of late.

  • Topre make luxury (in feel and price) keyboards that are a strange hybrid of spring and rubber dome, which I’ve since blogged about. My aim in life is to own one, but they’re hard to recommend the budget conscious.

  • Cherry MX switches power most high end keyboards today. They come in a wide variety of styles, and are relatively affordable. For the best mix of price and feel, I’d get one.

The Cherry MX keyboard line

Which gets us to picking keyboards. Cherry MX’s come in several varieties, most commonly being Green, Blue, Brown, Black and Red. We’ll use Cherry’s excellent diagrams below to demonstrate:

  • Cherry MX Blue

    Greens and Blues are “tactile clicky”, in that you can feel and hear the actuation point. They’re perfectly suited for touch typing, but conventional wisdom says they get in the way of rapid fire keypresses for gaming.

  • Cherry MX Red

    Reds and Blacks also have actuation points before bottoming out, but they have no tactile or audible feedback when you hit that point. This is great for gaming, but less so for touch typing.

  • Cherry MX Brown

    Browns are “tactile bump”, meaning they provide a little tactile feedback, but no audible. In a way, they’re a hybrid of the Blue/Green and Red/Black.

Conclusions

In the end, I went with a Vortex KBT ONE Mechanical Keyboard with Cherry MX Brown switches for work, mostly for noise reasons. My Unicomp IBM Model M clone is still my favourite keyboard of all time, but I think an MX Brown would be an excellent choice for those looking for a gaming and typing keyboard, given its softer tactile bump when it reaches its actuation point.

MechKB has a very good range of MX Browns if you’re in Australia, otherwise you can still use their site to get an idea of what’s available. If you have more money to splurge, you can even build a custom one yourself with whichever key layout and colour scheme you want, including Japanese, German and bright orange!


Changing the owner of a symlink

Software

I’ve decided to start a new post series: Ruben relearns obvious *nix things. Today, we try changing the owner of a symlink, fail, then realise we forgot to use the “-h” flag.

Trying to change the owner of a symlink this way doesn’t work:

# chown userX:groupX link

Now we use the -h flag:

# chown -h userX:groupX link

Now when we list:

# [permissions] userX userY [date] link

This works on FreeBSD and GNU. Thank you for your time.


Monday Postgres derp

Software

Reloading a test Postgres server:

# /etc/init.d/postgresql reload
==>* Reloading PostgreSQL 9.3 database server
==>* pg_ctl: PID file "/var/lib/postgresql/9.3/main/postmaster.pid" \
==> does not exist  [fail]

The problem? Yes, I attempted to reload a service I hadn’t started.

# /etc/init.d/postgresql start
==> * Starting PostgreSQL 9.3 database server    [ OK ] 

This is why people regard me as a professional.


The Back Nine, with Ben Sidran

Media

Ben Sidran's Don't Cry for No Hipster

It's been three years since we had a Ben Sidran album series. This is clearly three years too many. I'd say maybe even longer, if that were possible.

To rectify this, I've been listening to his 2013 album Don't Cry for No Hipster. He had me at the title, but its songs are equally splendid. It's the cool witty bebop jazz we know Ben for, replete with his trademark troll endings and the distinct feeling he's grinning from ear to ear as he lets us have the lyrics.

What I really dig are those little cars.

As the first track in this series, let's hear his take on golf.

Hmm, I'm thinkin' of making my own tees made up.
Say… bebop… bebop tees.
Put a ball on a bebop tee… goes where it pleases.

Grab from Amazon, watch on YouTube.


Initialising regrettable decisions with systemd

Software

Last month I moved the last of my Linux boxes from CentOS to Debian. Aside from being what work uses, a side benefit was not having to deal with systemd. Given Debian isn't just Linux, the chances of systemd being adopted by this last major holdout seemed unlikely.

Well then, here was a shocker from February I should have know about:

We exercise our power to decide in cases of overlapping jurisdiction
(6.1.2) by asserting that the default init system for Linux
architectures in jessie should be systemd.

There's still hope though, if you can parse this next paragraph of the vote announcment:

Should the project pass a General Resolution before the release of
"jessie" asserting a "position statement about issues of the day" on
init systems, that position replaces the outcome of this vote and is
adopted by the Technical Committee as its own decision.

As a FreeBSD guy, I'm used to over-engineered systems and decisions in the broader F/OSS community being made to benefit Linux instead of Unix. It forced my beloved Xfce desktop to only support a subset of features on the BSDs with its 4.10 release. systemd represents this for servers.

I suppose as the dominant player in this space, it was inevitable. But here's an idea; suppose FreeBSD uses its lack of systemd as a competitive advantage? Quoting Paul Venezia in InfoWorld:

To pick another element out of the same comments, there's suddenly an uptick in interest in FreeBSD. I've been a FreeBSD proponent for a long time, having run FreeBSD servers for two decades now. I've heard more than a few rumblings of veteran admins exploring the possibility of migrating services over to FreeBSD instead of Linux due to systemd, and I believe this idea may find more legs as time passes.

I'd like to see the evidence for this uptick, but its an interesting situation. This push factor, comibined with the new pkgng system makes FreeBSD even more attractive as an alternative. And, just because I can quote this too:

Especially now with all the fervor over Docker, if suddenly people discovered what FreeBSD jails have long been able to do, it might trigger industrial-size changes.

I admire his optimism, even if I don't share it yet!

Back in Linux, the one major distro not using systemd is Gentoo. I haven't used it on my own hardware since 2005, but my colleagues say OpenRC is rather lovely, and solves many of the problems people claim systemd is required for.


Australian Coalition repeals mining tax

Thoughts

Sunrise Dam Mine

The government, selling its budget:

Joe Hockey has told New Zealand that there is no crisis in the Australian
economy, nor is it in trouble.

The treasurer also made no mention of the "budget emergency" he and his
government referred to when justifying their unpopular budget to Australians.

Sorry, couldn't resist. Revenue forfeited from the mining tax:

delivered a $6.5 billion hit over four years to the budget bottom line.

And how did they pass it?

after striking a compromise with the Palmer United Party

Remind us again who runs that party?

The Palmer United Party (PUP) is an Australian political party, formed by
mining magnate Clive Palmer in April 2013

Greens Senator Christine Milne:

And if ever there is a conflict of interest, it is this one. How is it possible that you can have a coal billionaire voting to vote down a mining tax?

Featured image of the Sunrise Dam open pit mine by Calistemon.