[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Java + Tomcat slow on TS 109



The QNAP TS-109 has a Marvell 5182 500MHz processor. Specifications
can be found here: http://www.qnap.com/pro_detail_hardware.asp?p_id=91

I have installed lenny versions of openjdk 6 headless and mysql.
Tomcat 6 was downloaded from the tomcat webpages and installed
locally.
I have a small web application which outputs image files stored as
blobs in the mysql database.

The output of the binary data is done in a loop similar to the
following, where "in" is the mysql binary stream and "out" is the
servlet outputstream.
                byte[] rbuf = new byte[1024];
                while ((nbytes = in.read(rbuf)) != -1) {
                    out.write(rbuf, 0, nbytes);
                }


On the TS-109 this gives me speeds around 25 KB/s with "top" showing
the java process working at around 90-100 %.
For a 2,3M image this takes around 90 seconds.
On a 2GHz pentium 4, the same download using the same software and
binary data output implementation uses much less, maybe around 1
second.

What might be the reason for this difference in performance?
Is the java implementation on debian-arm particularly slow?
Is it possible to get better performance?

Regards,
Vegar


Reply to: