Sprint Day #2

Another productive day at the Toronto Code Sprint! Today was “sprint forward” day, so everyone got an hour less sleep than they expected, but by 10am everyone was back in the room, coding hard.

I’m proud to have closed two bugs [1] [2] today (both of the “one hour of study per one line of altered code” sort), moving towards our PostGIS goal of releasing what Mark Cave-Ayland has been eloquently calling a 1.4 “beater” for the PostGIS community to test prior to cutting an official numbered 1.4 release candidate. I think we’ll have all the critical bugs closed before the end of the week and have that beater out on the road, mowing down pedestrians, before the week is out.

Towards the end of the afternoon, I fired up the Shark and provided some profiling information for the Mapserver team, and talked about some profiles that Julien from MapGears had generated earlier. Julien is going to enhance some work I did last year on large shape files, to make traversing the shape file selection set even faster (the larger the shape file, the higher the benefit, but by traversing the selection set with 4-byte (int) pointer instead of a 1-byte (char) pointer he should be able to extract some good gains).

Steve Lime continues to contemplate the problem of improving the MapServer query work flow, to make WFS and large query performance on database back-ends faster. It sounds like we are rapidly converging on an answer, so hopefully tomorrow is the day we do an implementation and tie some back-ends into the solution.

At 6:30, we all trouped to the Baton Rouge for dinner, which was excellent. Thanks to Coordinate Solutions and SJ Geophysics for supporting today’s activities!

Sprint Day #1

Ready, set, go!

The first day of the Toronto Code Sprint 2009 was today, as 20 hackers from the geospatial “C Tribe” gathered in a smallish room at the Radisson hotel on the Toronto waterfront.

The weather was warm and clear yesterday, but cold and wet today, not that we noticed until the evening.

I spent my day huddled with the Largest Group of PostGIS Developers Ever Assembled. Myself, Regina Obe, Mark Cave-Ayland, Leo Hsu, Olivier Courtin and Pierre Racine. Day one was mostly talking, about our goals for PostGIS 1.4 (get it out the door, close the bugs and release a candidate) and PostGIS 2.0 (room for more types, strict support of ISO SQL/MM outputs, geodetic support, 3D objects, geometry typemods, and wktraster). We got a lot decided in a short period, and are ready to buckle down for some coding tomorrow in aid of getting 1.4 out the door.

Because I was huddled with PostGIS people, I didn’t get to participate in the Mapserver planning session. But over dinner I was told that XML map-file directions were discussed and decided on (a standard schema will be developed and XSLT transform from map->xml), performance issues were targeted (proj!), and a plan for one-pass querying (to speed up WFS mode) was settled on.

This evening, we watched the Hershey Bears best the Toronto Marlies of the AHL, featuring some fine offense (on the part of the Bears) and the requisite number of fights. Then we battled the weather (that cold, cold rain) back to dinner at East Sid Joe’s downtown. Thanks to our sponsors, qPublic.net and Rich Greenwood for supporting today’s activities.

Talkie Talkie

Everyone who does talks regularly has their own approach to building up the necessary content and flow. Dave Bouwman builds his talks up from post-it notes. A nice approach.

For brand new topics, I take a long walk, a couple hours or more around Beacon Hill Park, and roll ideas about – I carry a notepad so I can jot them down and then forget them again, keeping my brain loose. That first couple hours of walking hopefully yields the kernel of the talk and a a handful of interesting ideas – perhaps a dozen lines of text. Then I sit on the couch with a text editor and write the presentation like an essay. Outline in high level. Detail things, move those bits around, then actually write the talk, like an article, fully written out. When I get to around 5000 words I know I have about hour of material. I put ideas for graphics and slides in-lined in the text with «<»> characters. Once I’m happy with the story, I sit down in a separate session and build the actual slide deck. Google Images is a pretty useful source of pictures for almost any topic.

It’s an absurdly time-consuming process, but for keynotes and other instances where I’m monopolizing the attention of hundreds of people at a time, it’s a fair bargain. They are giving me their time en masse, they deserve a polished product – spend 5 minutes saying “um” or “ahhh” in front of 400 people, you’ve just wasted 33 hours of aggregate time.

FastCGI Hint

I’m preparing to benchmark / profile Mapserver and PostGIS for the upcoming code sprint in Toronto, and setting up Mapserver as a FastCGI is a requirement to get good profiling results. The JMeter bench marks run multiple threads of load, so having multiple Mapservers running makes things faster.

However, trying to get “FastCgiConfig” to dynamically spawn the required instances was a real pain. Setting the “updateInterval” nice and low made extra Mapserver processes come online a little faster, but in a kind of chunky way. It seemed to kill the existing process before flipping on the new ones. The config line looked like this:

FastCgiConfig -appConnTimeout 60 -idle-timeout 60 -init-start-delay 0 -minProcesses 2 -maxClassProcesses 6 -startDelay 5 -restart-delay 1 -killInterval 30 -singleThreshold 5 -updateInterval 1

In the end, I opted to just statically start the number of processes that made sense for my dual core system (4, in my estimation) using the “FastCgiServer” directive. The config line is a blissfully simple:

FastCgiServer /Users/pramsey/Sites/cgi-bin/mapserv.fcgi -processes 4

Throughput for simple tests (style-free roads from PostGIS, 4 threads of execution) is running as high as 48 maps per second.

Small Mercies

One of the “nice” things about having already lost most of ones investment portfolio is that further drops in the market aren’t nearly so emotionally distressing. 5% of the original investment, that was worth fretting about. 5% of what’s left? Meh.

I have become, in the words of the rock dude, comfortably numb.

Update: Good thing I’m in it for the long term. Oh, wait a minute.