I have a proxy server program which listens on a socket and creates a thread pool to process connections which come in spawning new threads if necessary to handle any additional overhead. When I start up the program on java 1.5 its memory footprint is 90M while if I use a java 1.6 jvm, it has a 60M footprint, this seems larger large for a simple proxy server program, is it normal?
I ask this because the system has rather limited memory and sometimes it throws OutOfMemoryException.
Above statistics are for when i start off with an initial thread pool size of less than 10. I I increase the initial thread pool size to 50, its memory footprint on jvm 1.5 is around 120M.
How can I reduce the memory usage?