Temporary Files and Comparing WAS with Tomcat
kgibm 0600027VAP Visits (2361)
A recent customer was comparing performance between WAS and Tomcat. Tomcat was performing much better. The application used temporary files intensively. After investigating thread dumps, we found that the sampled WAS threads showed much more temprorary file I/O activity than Tomcat threads. Next, we discovered that Tomcat changes Java's default temporary directory to the "temp" subdirectory of the Tomcat installation using the -Djava.io.tmpdir system property.
It turned out that Tomcat happened to be installed on a faster disk than /var/tmp, which WAS used for temporary files.
The other interesting lesson was that if you are using temporary files intensively, then you may benefit tremendously from pointing -Djava.io.tmpdir to a tmpfs filesystem (assuming your application can accept the semantics of a memory based filesystem).