我正在尝试在MySQL数据库(10GB设置)上使用YCSB客户端运行仅扫描工作负载。我正在使用以下命令来运行工作负载

./bin/ycsb运行jdbc -P工作负载/ workloademod -p db.driver = com.mysql.jd bc.Driver -p db.url = jdbc:mysql:// localhost:3306 / ycsbtest -p db.user =用户名-p maxscanlength = 100 -p recordcount = 5000 -p operationcount = 1000 -p maxexecutiontime = 1800> try_ycsb_emod

但是我得到了内存不足的Java GC异常,工作负载如下被杀死:

Loading workload...
Starting test.
Maximum execution time specified as: 1800 secs
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3380)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3327)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
        at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1928)
        at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3278)
        at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:462)
        at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2997)
        at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2245)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2638)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030)
        at com.yahoo.ycsb.db.JdbcDBClient.scan(JdbcDBClient.java:348)
        at com.yahoo.ycsb.DBWrapper.scan(DBWrapper.java:107)
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransactionScan(CoreWorkload.java:605)
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransaction(CoreWorkload.java:491)
        at com.yahoo.ycsb.ClientThread.run(Client.java:233)
Could not wait until max specified time, TerminatorThread interrupted.


我尝试通过执行“ export YCSB_HEAP_SIZE = 8000”以使其达到8G来增加ycsb客户端的Java堆大小,但仍然出现相同的错误。

我检查了ycsb客户端发送到mysql服务器的mysql查询,但没有看到对max_scan_length度量的引用/暗示。另外,使用mysql客户端而不是ycsb客户端运行此mysql查询也可以。

我不确定该如何解决。有人可以帮我吗?

谢谢,
雷内

最佳答案

jdbc实现是一个错误:
https://github.com/brianfrankcooper/YCSB/issues/171

10-07 13:27