Tuesday, August 7, 2012

Detecting site performance anomalies using cURL

I recently participated in an IBM Webshpere Commerce Server deployment and was tasked with hunting down the source of some performance anomalies. cURL is a tool that has the ability to easily probe and collect detailed timing data using its many options. Below are the links I referenced to write my scripts that provided critical information and insight into the problem. I will add more detail here soon about what exact steps I used. 


http://newestindustry.org/2006/10/03/baseline-testing-with-curl-2/

http://josephscott.org/archives/2011/10/timing-details-with-curl/

http://www.jonefox.com/blog/2011/10/10/find-the-time-to-first-byte-using-curl/

http://curl.haxx.se/docs/manual.html

Front-end enginerring: Image compression


I recently participated in an IBM Webshpere Commerce Server deployment and was surprised when I ran Google's PageSpeed against the site, that it suggests the use of image optimizers on the stock widget graphics. The analysis for one of our pages was as follows:




The detailed message under the Learn more link was helpful in that it linked to the tools they suggest using - bookmarking it here for reference:


Use an image compressor.

Several tools are available that perform further, lossless compression on JPEG and PNG files, with no effect on image quality. For JPEG, we recommend jpegtran or jpegoptim (available on Linux only; run with the --strip-all option). For PNG, we recommend OptiPNG or PNGOUT.

Tip: When you run Page Speed against a page referencing JPEG and PNG files, it automatically compresses the files and saves the output to a configurable directory.

I would expect an off the shelf tool to do these kinds of optimizations on their own graphics before shipping, no? Some of the absolute numbers seem small, but every 1.5K is a packet that doesn't need to be sent, and this is a small step to make for such an easy gain.

Friday, September 30, 2011

RAMDisk options for Windows

IBM Rational Application Developer can be real hard on the disk, especially when debugging in the test environment for Websphere 6. In lieu of convincing my employer that every developer should get a speedy SSD or RAM-based disk to minimize wait times between WAS6 restarts, I have been investigating the available options and have been looking at software based RAMDisks. These could even be faster than most SSD disks, in theory.
I was pleasantly surprised to find these options below are available for Windows 7:
For now, I need to test these out and see if there really is a benefit for some of the IBM RAD slowness I see on a daily basis. I will post my findings here at a later date.

Saturday, September 24, 2011

Graywater Heat Reclaimation

Just some links/notes on a topic I became interested recently. Why do I find graywater heat reclaimation interesting?
  • cost saving: reduced energy bill
  • cost saving: extends the life of the water heater
  • cost avoidance: average water heater recovery times are markedly improved
  • environmental goodness
  • low/no risk: passive system with no moving parts
See

Seems like the price is around $750 for a bit of copper pipe that is supposed to last about 50 years.

Javascript: An easy to make day-of-week calculation bug


Friday, July 8, 2011

Windows batch script timestamps from gAWK

# This uses GNU Awk to emit a script to set an environment variable to the current date and time in a format suitable for use as a filename.
# See http://www.gnu.org/software/gawk/manual/
# You should supply two variables:
# 1) output_filename
# 2) env_var
BEGIN {
format = "%Y%m%d_%H%M%S"
print "set " env_var "=" strftime(format) > output_filename
}


Invoke with something like

gawk -v "output_filename=tsgenerated.bat" -v "env_var=TS" -f dt.awk
call tsgenerated.bat