Friday, March 21, 2008
Wednesday, March 05, 2008
A quick howto to setup JMeter
JMeter is an open source load testing tool, it's pretty easy to get up
and running and it's quite fun to test and break things on your own server.
Here's a quick getting started guide on how to record a simple test plan.
Download and install JMeter
Open Jmeter (bin/Jmeter.bat on Windows)
Add (via right click) a Thread group to the Test Plan
Add a Non Test Element > HTTP Proxy Server to the Workbench
Open the HTTP Proxy Server Page and change the port if required
Set the Target Controller to Test Plan > Thread Group on the same page
Configure your browser (Firefox!) to use the Proxy Server (it's localhost)
Press Start at the bottom of the page
Now, JMeter will record all the HTTP requests your browser makes, so make sure you have closed all the other tabs you have open, otherwise you will get a mixture of Ad's and ajax requests recorded as well.
As an example, tonight I was doing some load testing on the Tile service for Mapguide, so I opened a map and zoomed in and panned around a bit. Then I pressed Stop in JMeter and I had a list of HTTP requests. Simple!
Don't forget to reset your browser proxy settings!
You can delete any requests you don't want from the list at any time.
Add a Timer > Gaussian Random Timer to the Thread Group which will make the requests random.
Add a Listener > Aggregate Report to the Test Plan
Now for the first run, the default load setting is fine.
Select the Aggregate Report and the from the top menu click Run > Start
If that worked out ok and there are no errors, you can the configure the thread group to run multiple times with multiple users. You can see I had an error rate of 100% in the example above.
If you get errors, check your webserver and application server logs. You can also log and view each http request and response using Listener > View Results in Table. Filtering to only show errors is also helpful.
If you are running a big load test, remember each Listener keeps a copy of the results in memory so you might be better running a Listener > Simple Data Writer instead which writes the results out to a file. You can then read the file in later into any of the reports.
Overall it took me a bit of time to get familiar with JMeter, there's lots of cool things you can do with it. Keep in mind session handling (cookies) for dynamic applications as well!
Remember to read the documentation and be careful! Make sure you know what servers will be affected by your testing, and don't jump to simple conclusions, 3-tier web apps are complex beasts.
I have seen developers trying to solve a performance issue and completely misunderstanding the problem. Then they go and try and solve the wrong problem, usually involving lots of wasted coding.
Always start with a smaller load, you better off finding and fixing a bug which occurs often under low load, than an obscure bug which occurs only under extreme load.
Monday, March 03, 2008
EPSG for Australia
http://spatialreference.org/ref/epsg/3112/
http://spatialreference.org/ref/epsg/4283/
for things like PSMA & GA datasets
notice that Tassie looks better and australia isn't so wiiiide in EPSG:3112
tho, generally speaking EPSG:4283 is better choice as it's there out of the box
Oracle didn't have EPSG:3112 so i created one, EPSG:4283 is srid 4283
INSERT INTO mdsys.SDO_CS_SRS ( CS_NAME, SRID, AUTH_SRID, AUTH_NAME, WKTEXT )
VALUES ('GDA94 / Geoscience Australia Lambert', 3112, 3112, 'EPSG',
'PROJCS["GDA94 / Geoscience Australia Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",134],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3112"]]'
);
COMMIT;
Sunday, March 02, 2008
Free public transport in Melbourne? Maybe.....
Over at The Age is a story about yet another IT disaster when it comes to developing a new electronic ticketing systems for Melbourne.
Passengers face $500m ticket chaos talks about the 15 month over due 'mkyi' system still being MIA and the old MetCard system being about to fall over. They can't get any new machines for the slightly expanding network and some spare parts aren't available anymore.
Time to stop wasting money on ticketing systems and make public transport free.
It will never happen because the politicians are scared about having to spend a lot more money on expanding the transport network. The logic behind that is that if it's free, we all pay for it and therefore all suburbs deserve the equal service.
Now that would be progressive green politics, carbon friendly and just think how much closer the whole community will become from more BO on even more crowded trains...
Did you know the control system Metrol for the Met in Melbourne dates back from the 70's, it's why they can't increase the frequency of the network at least until when the new one, cough, is meant to go into service in 2010
Mapguide 2.0 Released - PNG8 Goodness
I have really enjoyed helping test on the new Mapguide 2.0.0 Release, it's a bit slower than the previous release, but that's not so much an issue if your caching everything heavy using tiled maps.
One of the new features is support for PNG8 images. You can configure the tile service to use PNG8 in the serverconfig.ini under the [TileServiceProperties] Imageformat parameter, the header comments don't mention it yet, here's my patch.
It would be nice in the future for the tile format to be configurable in the Map Definition per Base Layer Group, rather than a server wide setting.
Here is a True Marble Tile using PNG8 (36.98 kB) 
The same tile as a 24 bit PNG (135.26 kB)
You can barely visually tell the difference, basically there is loss of detail of a black shadow next to the coastline, but there is 100kB difference in file size per tile.
That adds up to well over 1 MB saving per map, depending on you map size. That's 1GB over 1000 page impressions for a page containing this map. That is a huge improvement ! I will investigate later the savings for non-raster tiles
There is also the Fusion framework for doing flexible layouts which also includes the Native Mapguide Layer support for OpenLayers which rocks!
Thursday, February 28, 2008
How to kill a well hung Windows Service
I was doing some beta testing today with Mapguide RC4 and Gdal, playing with the True Marble imagery and i managed to crash the windows service in the stopping state.
BTW, True Marble is a colour corrected version of NASA's satellite imagery, have a look it's quite cool.
Anyway back to the hung stopping service. This is really soo frustrating especially as on Windows Server 2003 you will get an access denied if you try to kill the service process via task manager or pskill type tools.
You can always do the three finger windows salute, but there was an Oracle backup running and I just wanted to keep playing beta (besides rebooting is so 1990's). So i googled the problem again and this time i found a solution
ZeroWave: a powered TaskManager which has an INSANE mode which managed to kill the process off :)
The phrase "very friendly graphical interface" for something which lists PID's and Executable names, that's one i hadn't thought of before.
Usual disclaimer, you can seriously render things broken doing this
Thursday, February 21, 2008
Mapguide 2.0 - AGG versus GD Renderers
Using the AGG Renderer ( New default in MG 2.0 )
Using the GD Renderer
Here is the same layer using the different renderering engines in Mapguide 2.0. The main difference between the two is that AGG does sub-pixel rendering which give smoother lines, whereas GD is pixel level.
The AGG lines feel a bit too thick to me, they are line thickness one for a polygon boundary. Even for a straight line in the middle of the map, it's just to thick (That's SA/NT border in Australian for those aren't so familiar with Australia.) The src data is 29 MB so there is a fair amount of generalization being done but hey that might be the reason for the thicker lines.
GD is the same as earlier Mapguide Releases and is still available via changing the Renderer value in the server/bin/serverconfig.ini file.
I like the darker smoother stronger feel of the AGG lines, but i think they would be better if they were maybe 1/2 to 1/3 thinner. What do you think?
These are rendered from SDF's exported from Oracle using FDO2FDO which is now work again in Mapguide 2.0 RC4. Generally everything is working well since installing it an few hours ago, next up i will upgrade my java libs with Coldfusion 8 and do some more testing API wise.
Friday, February 15, 2008
PicLens, coolest firefox extension ever!
Just read about this over on http://planet.mozilla.org/.
Allan Beaufour has just blogged about PicLens which is an amazing 3D picture viewer.
Once you install it, every image (on sites like picasa, facebook, myadspace) gets a little play button when you hover over the image with the mouse, click it and you jump into this amazing 3D film strip which you can use to explore through the images...
Install it, (you have to allow the site to install) and the jump over to my photo's on picasaweb, go into an album and press the play button to explore
Tuesday, February 12, 2008
Anchors can make great web bookmarks
One of the more useful sites for TV listings in Australia is yourtv.com.au. I have a bookmark for their page with the what's on now and next view view.
if you compare the results, you can see why anchors (the '#pageTitle' below in the second URL) for a more friendly bookmark
If you compare http://yourtv.com.au/guide/index.cfm?action=nownext
with
http://yourtv.com.au/guide/index.cfm?action=nownext#pageTitle, you'll see the TV guide opening up at the start of TV guide, instantly readable without scrolling down thru half a page of ads and headers.
One a related note, the introduction of HD in Australia is, well, stupid. There is no good reason 10HD isn't broadcast in digitial via SD.
Complicate that with tv listings that don't display 10 and 10HD next to each other so you can see when there is different HD programming (there's a lot of overlap, etc).
