Monday, October 26, 2015

Java Performance and Memory Issues


Java Performance and Memory Issues
 
 
Pool valuable system resources like threads, database connections, socket connections etc.
Emphasize on reuse of threads from a pool of threads.
Creating new threads and discarding them after use can adversely affect performance.
Also consider using multi-threading in your single-threaded applications where possible to enhance performance.
Optimize the pool sizes based on system and application specifications and requirements.
Having too many threads in a pool also can result in performance and scalability problems due to consumption of memory stacks and CPU context switching.
 
Minimize network overheads by retrieving several related items simultaneously in one remote invocation if possible. Remote method invocations involve a network round-trip, marshaling and unmarshaling of parameters, which can cause huge performance problems if the remote interface is poorly designed. 

No comments:

Post a Comment