A decent article on scaling up your java applications: Scaling Your Java EE Applications
Here’s a list of tips:
- Make synchronized blocks as short as possible
- Reduce lock granularity
- Avoid lock on static methods
- Use lock free data structure in Java SE 5.0
- Be ware of race conditions: HashMap bug / consider using ConcurrentHashMap
- Use Non-Blocking I/O for high concurrency (Tomcat uses Blocking I/O, Glassfish uses Non-Blocking)
- Parallelize single-thread tasks if possible by seeking independence in order of operations. JOMP or Parallel Java may be used to simplify this task.
- To scale up in memory use multiple JVMs and limit the memory allocated to each to about 3GB or less.
- Database - pay attention to isolation levels. keep stored procedures to a minimum.
- Be ware of operating system and disk I/O limitations such as have a large number of files in one directory.
- Synchronous logging
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment