Archive Page 2


PHP vs. Ruby/JRuby on Rails vs. Grails vs. Java performance comparison

In this write-up I captured my findings about the performance of various frameworks that I was considering for my next project…

Test setup:

  • One MySQL 5.1 table consisting of an ID and 2 string columns, 1000 rows (+5 for warm-up)
  • a simple web application that:
    • reads one record from the table
    • displays record data on a web page in table form
The page is accessed sequentially 5 times to warm up the caches, then 1000 times (timed). The time is captured below.

Test subjects:

  1. PHP 5.3.3 on Apache 2.2.21
  2. Ruby 1.8.7 + Rails 3.1.3 on mongrel 1.1.5
  3. JRuby 1.6.5 (emulating Ruby 1.8.7) + Rails 3.1.3 on mongrel 1.1.5
  4. Grails 2.0.0 (Groovy 1.8.4) on Tomcat 7.0.16
  5. Java 1.7 + Spring 3 on Tomcat 7.0.23

Everything was set to ‘production mode’. Test platform: win32.

Test results:

Framework Time per request
PHP 10.6ms
Ruby/Rails 14.1ms
JRuby/Rails 16.0ms
Grails/Groovy 7.4ms
Java 6.4ms

Java seems to be a clear winner here… too bad it’s by far the slowest of the 5 to develop in! :-[]

p.s. I know my JRuby setup is awkward… I just couldn’t get any sane performance out of it on a Tomcat. The perf I got in this post is the best I could achieve.


Stupid AP-7131 power socket

Hooked up a Motorola AP-7131 to a 300W 48V power supply today… incorrectly 🙂

PAF! Said Motorola.

Usually a bad sign.

As it turned out a fix is surprisingly painless: one 22uF 63V (or more) capacitor  (C403) and one 1 Ohm resistor (R400).

There is also plenty of space so you don’t need SMD components.

This is the cap that blew:

Sorry, no pic of the blown resistor. It’s hard to see anyway, looks almost normal.

And here is the new cap:

And the resistor (it is on the other side):


Motorola AP-7131 power and console connectors

Motorola isn’t very helpful in documenting various connectors on their business units, such as the AP-7131 wi-fi access point. So here you go…

The Power Connector

The power requirement of a AP-7131 is 48V DC, 0.7A (thus a minimum of 35W). The socket is a 4-pin male socket. It is exactly the same as the auxiliary 12V connector on an ATX board. A connector salvaged from a burnt out power supply will fit perfectly.

As it turns out the pinout of the AP-7131 power socket is exact opposite of the ATX one. Learned it the hard way (more on that later).

The pinout is:

  1. Two at the top:  GND
  2. Two at the bottom: +48Vdc

The Console Connector

The Console connector is similar to that of Cisco, with just a minor difference. Ground, Rx and Rx are the same, so a Cisco cable will work, if hardware flow control is disabled.

The pinout is:

  1. ?
  2. – not connected –
  3. Tx
  4. Gnd
  5. Gnd
  6. Rx
  7. – not connected –
  8. ?

Note: I didn’t bother figuring out the hardware flow pins.


Hello world!

Hello world! :p

Sorry, the first few posts will come slightly out of order. Have lots of pre-existing info that needed to be published for a while…