We're updating the issue view to help you get more done. 

Hibernate 4.1.0 Cache slows on FLUSH (bulk data processing in java sub thread)

Description

Hi,

We are facing a major issue of hibernate cache slowness when we have 10 to 20k uncommitted data (i.e. mandatory needs single commit)

Hibernate 4.1.0

Example

Parent Java Class does some business logic processing (has hibernate queries etc) and load 5 Id's from database these id's are further passed to other java class (helper)

which does batch processing (each Id has 10 to 30k child records which needs to be processed in single commit) after this processing helper sends back the call to parent java class where further massaging on entities happens and generate final output.

When helper processes batch data we see slowness gradually increasing on hibernate flush method. I am attaching JVM traces (JVisualVM.exe) nps file which shows waits on flush method for 60% out of total 100 of processing. I have also observed insert/updates on database start getting triggered to very slow from java due to slowness in cache. Flush mode is set to AUTO.

I am seeking help on why hibernate cache slows down. Is there anything i should check with respect to configurations? As having 30k uncommitted data in cache must now slow down Java processing so much that wait on flush gets spiked to 60% or above.

Attached JVM trace.

RJ

Environment

Linux : JDK 1.8

Status

Assignee

Unassigned

Reporter

Rohit Jadhav

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major