I 'll make no comment about the difficulty to tune a virtual machine. Oh.. I would said just a few words : prefer design and don't hope you will tune your quick development that has been quickly deployed in production under preasure.
Yesterday, my manager asked me about a problem concerning the eden space memory. So, this is a summary of JVM's memory management. Heap Size The allocation of memory for the JVM is specified using -X options when starting ColdFusionJVM option Meaning -Xms initial java heap size -Xmx maximum java heap size -Xmn the size of the heap for the young generation (extended options) -XX:MaxPermSize maximum permanent generation size (for creating object instances) For efficient garbage collection, the -Xmn value should be lower than the -Xmx value.Heap size does not determine the amount of memory your process uses If you monitor your java process with an OS tool like top or taskmanager, you may see the amount of memory you use exceed the amount you have specified for -Xmx. -Xmx limits the java heap size, java will allocate memory for other things, including a stack for each thread. It is not unusual for the total memory consumption of the VM to exceed the value of -Xmx.Garba…
I read this article that is very interesting (thank you very much Marco) :
Suppose you need to insert 200,000 records into a database in Hibernate. You'll need to adjust the following settings: //set the JDBC batch size (it is fine somewhere between 20-50) hibernate.jdbc.batch_size 30
Humm... Well it's done! I don't want to spam Marco's blog (javacomptoir) anymore with dailly messages. On this blog, I will write about my readings, about articles I found on the web. In many cases, I will be about Java. But sometimes, It will be about related technologies such as databases, global software architecture and... my favorite activity during spare times : Violet, THE Very Intuitive Object modeling software that I develop behind Cay S. Horstmann.
Thus, this blog will be a sort of bookmark with some experience feedbacks