-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to increase the writing throughput #566
Comments
May you post your inserting data records code here? We can take a look and find out the bottleneck. In the testing, single core can handle at least 20K insert requests per second. There must be something not efficient in your code. For TSDB_CODE_MAX_SESSIONS error, please set debugFlag to 135 in taos.cfg in both client and server, and re-run the testing, and post the log file there. We can tell why |
===============================tasod info============================ inserting code:
} void TdbMgr::BatchInsertTranscationData(vector<TickTranscation *> * pVectors, string sMarket, int nMarketDate) |
我测试环境使用4线程调用BatchInsertTranscationData插入数据 |
我生产环境使用单线程调用BatchInsertTranscationData插入数据 taosdlog.0: |
请问还有问题吗?我们已经发布了2.0.3.0版本,请使用最新的版本测试。 |
场景:
1.版本 client version:1.6.2.0 server version:1.6.2.0
1.CREATE DATABASE tdb precision 'us';
2.创建 1张10列左右的超级表, 1张 30列左右的超级表
3.采用异步接口插入数据
taos_query_a(m_pTaos, (char *)sSql.c_str(), InsertSnapshotDataCallBack, pParam);
4.插入语句 insert into xxx using xxx tag xxx
5.数据峰值3w-6w/s, 平时6k-8k/s 笔记录
尝试步骤:
1.采用单线程单个m_pTaos, 单记录insert into 出现性能问题,记录无法插入太慢。
2.采用多线程单个m_pTaos, 单记录insert into, 出现插入失败-65, TSDB_CODE_MAX_SESSIONS
3.采用多线程多个m_pTaos,单记录insert into, 出现插入失败-65, TSDB_CODE_MAX_SESSIONS
4.采用单线程单个m_pTaos, 多记录批量insert, 单次批量插入的记录超过50笔时出现 -1, TSDB_CODE_ACTION_IN_PROGRESS
5.目前采用单线程单个m_pTaos, 多记录批量insert, 单次批量插入的记录20笔, 部分解决性能问题,但是数据峰值的时候会出现大量数据挤压,延迟5分左右才能全部处理完成。
针对这种情况, 有什么方案能提高写入速度呢,也尝试修改过服务器配置中的相关sessions最大值均无效。
The text was updated successfully, but these errors were encountered: