Archive for the ‘Open Source Software’ Category

Hard to Find a Good Fine-Grained Timer on Linux

Wednesday, February 9th, 2011

Linux

I'm looking at some logs of a client of my ticker plant. I'm trying to iron out the last few bugs in the system, and I'm coming across the following data that's making no sense whatsoever. Basically, every 10 sec, my client is printing stats on the messages it's received. Things like messages received per second (on average), messages conflated, the size of the conflation queue, the min, max, and average delay of the messages as timestamped when they arrive from the exchange to the time they are received by my client code.

What I'm seeing is something like this:

Time Messages
(/sec)
Conf Msgs
(/sec)
Conf Queue
(msgs)
Max Delay
(msec)
13:30:47.01 4083.4 550.6 0 838.6
13:30:57.01 6561.7 547.6 24 13459.0
13:31:07.01 5170.2 797.5 0 410.7

My concern is about the max delay - the last column, and for the middle time slice. It's showing that on an empty conflation queue, this interval had a maximum delay from the source of 13 sec.! That's longer than the sampling interval. It's as if it was hiding up stream!

I initially suspected the time base I was using. Originally, I was using gettimeofday() as it's pretty universal, and calculating the microseconds since epoch with:

  struct timeval  tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec * 1000000 + tv.tv_usec);

Then I read on stackoverflow that this isn't a very good timebase, and I switched to the supposedly more stable clock_gettime():

  struct timespec  tv;
  clock_gettime(CLOCK_REALTIME, &tv);
  return (tv.tv_sec * 1000000 + tv.tv_nsec/1000);

I'm not sure if this is going to be a lot better, as I think there's a problem still lurking in my code, but it's a start. Getting a good timer is important when you're timing things this close.

Upgraded WordPress to 3.0.5 at HostMonster

Wednesday, February 9th, 2011

wordpress.gif

This morning, when I restarted Google Chrome, I noticed that there was an update to WordPress 3.0.5, so I went to HostMonster and updated all my installations and verified that they all took.

It's a little thing, yes, and I suppose there are a lot of places that this occurs, but I have to say that I'm just a very happy user of this kind of service. I used to run all these things on my own boxes, and while it was OK, it was just OK, and I soon realized that it was just a lot more work than pleasure. Glad I switched.

Google Chrome dev 10.0.648.45 is Out

Wednesday, February 9th, 2011

V8 Javascript Engine

This morning I noticed that Google Chrome dev 10.0.648.45 was out with a few really nice additions. Among them are the latest V8 engine (3.0.12.12) and Flash (10.2), but also "many crash fixes". Good enough for them. I'm not using Flash anywhere else on my MacBook Pro, so it's my one place to view Flash content - and I use it every now and then, but not often.

When I restarted it, it was amazingly fast, and I was jazzed for the first time in a long time. Wouldn't this be great! I thought. But after a bit it was back to 'normal' speed. Guess Comcast was just speedy then.

Google Chrome dev 10.0.648.18 is Out

Friday, February 4th, 2011

This morning the Google Chrome team released 10.0.648.18 with a nice list of changes - including the latest version of their V8 javascript engine - 3.0.12.8. There were also a few Mac-specific fixes, and that's great, but they still have that new preferences 'page' that you can't resize the left-hand selector. Very odd, and even annoying as it's so bloody large.

So it goes... can't have it all, I suppose.

Google Chrome dev 10.0.648.11 is Out

Tuesday, February 1st, 2011

GoogleChrome.jpg

This morning I saw that Google Chrome dev 10.0.648.11 is out, and the release notes indicate that it's really about bug fixes and enhancements to the new preferences pane. It's not a horrible idea - to make a cross-platform preferences pane, but it's going to be unlike every other preferences system the user is used to - on any platform.

Sure, most will get used to it, but I don't understand the need to have such a "one size fits all" attitude to software. The basic browser is cross-platform, but there's no reason to make every keystroke and button the same. Oh well... that's Google.

MacVim Snapshot 57 is Out

Monday, January 31st, 2011

vim.jpg

This morning I found that they have released MacVim Snapshot 57 with some interesting new features. It's an amazing port of Vim to the Mac, and the speed is just amazing. Well worth getting if you're a Vim fan on the Mac.

Doing a Little Work Debugging ZeroMQ

Thursday, January 27th, 2011

ZeroMQ

I got a response from Steve on the ZeroMQ mailing list about my problems with the latest clone of the github repo. My initial email wasn't very solid, and I've learned a lot sense then, so I made a very nice, detailed response - with line numbers and logic flow, so that he can see the problem I've run into and hopefully come up with a solution.

We'll see in a bit, but for now, it's nice that we have a fall-back tarball that I kept. It's working fine on CentOS 5 and Ubuntu 10.04.1.

Upgraded to Git 1.7.3.5 on my MacBook Pro

Thursday, January 27th, 2011

gitLogo.gif

This morning I was wondering what the latest version of git was, and decided to check the nice Mac OS X Git Installer and was very happy to see that they now have x86_64 and i386 packages. Previously, it was only i386, and while I don't expect to see a huge difference in the 64-bit version, it's nice to get as many tools moved to 64-bit as possible.

Sure enough, after installing the package, I was treated to:

  $ git --version
  git version 1.7.3.5

Sweet.

The Internet Really Has Changed Communication – Amazing

Thursday, January 27th, 2011

chat.jpg

I'm sitting on the couch this morning, reading my news, the feeds, etc. - just like I do every day and I got a chat from a guy I chatted with yesterday in the ZeroMQ chat room on freenode. He was chatting me about some questions he'd had on ZeroMQ usage and I was helping him. We talked for about half an hour - until I had to leave to catch the train, and then we finished things up when I got to work.

The amazing thing is that this took place at 3:30 am my time. This guy is clearly in Europe, and we're chatting like he's in the next room. Sure, you can do this all with phones, and this technology isn't new, it's just become so pervasive. Everyone has a chat client. Everyone has an IM client. And everyone uses them.

The world has become a much smaller place. Neighborhoods are now really places of common interest, in addition to the physical street you live on. It's really just stunning to me sometimes. I can remember ARPAnet getting going. I can remember the cool tools of ftp and telnet. I can remember seeing all this grow. It's inspiring, it really is.

I can remember my Dad once saying that his Dad saw the invention of radio and lived to see it used to talk to a man on the moon. I feel just as awestruck. We live in amazing times.

Google Chrome dev 10.0.648.6 is Out

Thursday, January 27th, 2011

This morning I saw that Google Chrome dev 10.0.648.6 was out with just a series of bug fixes ported into the dev channel from the other channels. It's a nice little maintenance release for today.