0 Replies Latest reply on Jan 11, 2019 2:52 AM by rohiitj

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




      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



           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.