Hibernate version:Hibernate 2.1
Name and version of the database you are using:MySQL 4.0.12
Testing Machine: Intel P4 2.8G, with 1G RAM, running WindowsXP
I'm testing and tunning the performance of the Hibernate Layer and the database in my application. I have an object in class A, with childrens and sub-childrens. In total, the no. of all objects / sub-objects under an object in class A is about 150. All the create/update/remove to the childrens (and sub-childrens) are done by cascading effects. I try to measure the performance of doing create / retrieve / update / delete. here is the metrics. All the units are in seconds
Let N be No. of objects in class A (actual no. of objects = N * 150)
N C R U D
100 10 2 10 5
200 36 4 35 10
300 74 6 77 18
400 138 8 161 23
some findings
1. time for Retrieval and Delete scales linearly, while for C and U do not
2. time for C and U are comparable
However, the performance degrades sharply when there are more than 500 objects. I wonder would it be caused by the session is always full of the newly created objects.
Anyway, i have set jdbc-batch-size to be 20, and disable the second level cache.
My question is, are those presented figures be resonable? Since I could not find any similar figures or benchmarking I can compare to. And actually , I'm not quite satisfactory about the performance. I'm not sure whether it would be useful to set the batch-size and second level cache (actually even i didn't set the batch-size, i got similar results), or I have missed something so that the batch updating is not fully utlized. Any suggestions how I can further tune my application, or about my data? Any reference or similar resources I can make comparison to or have more tunning tips? Thank very much for any comments.
|