Hsqldb insert/select/delete operation duration peaks up sometimes

  • ecu

    ecu - 2014-08-27

    I am testing HSQLDB performance so as to decide whether use for a project or not.
    I am using hsqldb as embedded and full in-memory to achieve best performance.

    I have a table and insert 20 millions rows into it. After 1 million rows are inserted into the database, I have 10 threads which continously inserts a row into table and 10 Select&Delete thread which queries a row and deletes it if the query is successful. I measure the duration for each insert and select and delete execution.

    For these durations, i observed some peak values which degrades the performance very much. For example, as can be seen below, the insert execution duration is generally order of hundreds but sometimes this duration peaks up to order of seconds;

    Thread: inserter4 Duration : 328 us
    Thread: inserter8 Duration : 288 us
    Thread: inserter1 Duration : 178 us
    Thread: inserter6 Duration : 131 us
    Thread: inserter5 Duration : 224 us
    Thread: inserter9 Duration : 242 us
    Thread: inserter0 Duration : 169 us
    Thread: inserter4 Duration : 5067521 us

    I allocate 100Gb memory for the program, 20 million records spends about 70Gb memory. I set the database transaction control to mvcc, full in memory and embedded.

    Do you have any idea what may cause this problem?

  • Fred Toussi

    Fred Toussi - 2014-08-27

    There may be garbage collection or thread sheduling issues that cause some thread to take longer as it is waiting for other threads to complete.

    For very large in-memory databases HyperXtremeSQL is a better choice as it uses much less memroy and would probably work more smoothly.


Log in to post a comment.