TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

A memory consumption exception occurred in a multiprocess performance test

Open xujin-wk opened this issue 6 years ago • 6 comments

Performance Issue write data into taos(20000records/s * 16 processes on a node)by taos-jdbc,after running a period of time,The physical memory will be used up and the JVM will be killed

Problem Description when i write data into taos by jdbc,Used physical Memory continues to increase along with time going.finally,when all physical mem has been used,part of 16 process will be killed,then release some mem can continue to run other process,always like this,until all processes are killed

  • OS: CentOS 7.0
  • 96GB6nodes,40core6nodes,3T disk *6nodes
  • TDengine Version 2.0.1 *jdbcdriver version 2.0.0

xujin-wk avatar Aug 12 '20 09:08 xujin-wk

or say,when jdbc call JNI function library, Is there a memory recovery mechanism?

xujin-wk avatar Aug 12 '20 10:08 xujin-wk

Which version of taos-jdbc driver do you use with this problem?I have this problem in taos-jdbcdriver 2.0.2 to connect tdengine 2.0.1,when I use taos-jdbcdriver 1.0.3 to connect tdengine 1.6.5.9 is normal.

18378333917 avatar Aug 13 '20 02:08 18378333917

@18378333917 taos-jdbcdriver 2.0.0 which I used in this test,and instead of get jdbc from maven lib,I compile the jdbc-driver 2.0.0 by myself from tdengine2.0.1 source

xujin-wk avatar Aug 13 '20 02:08 xujin-wk

please use latest TDengine and JDBC driver to try. We did fix a memory leak bug recently.

sangshuduo avatar Aug 25 '20 14:08 sangshuduo

check your code and use jdbc like this:

Statement stat = connection.createStatement();
ResultSet result = stat.execute(sql);
while(result.next()){
...
}
result.close();
stat.close();

the statement should be closed every time

zyyang90 avatar Sep 03 '20 02:09 zyyang90

this issue is closed by the assignees

zyyang90 avatar Sep 09 '20 03:09 zyyang90