我有一台带有WD WD500LPLX (7200 RPM500GB)2.5英寸HDD的机器Intel Atom WD500LPLX(8 8Core)。操作系统是Ubuntu15.10(内核4.2),MariaDB 10 (默认配置)
我是插入大约20-30行每秒(行大小355字节)。看起来瓶颈是HDD,但是wMB/s很低,利用率也很高。我还能做什么让它需要更多的交易。
谢谢。
通过以下方式:
碘化钾-m -x 1
avg-cpu: %user %nice %system %iowait %steal %idle
0.50 0.00 0.50 12.20 0.00 86.79
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 22.00 0.00 61.00 0.00 0.39 12.98 1.00 15.74 0.00 15.74 16.13 98.40
avg-cpu: %user %nice %system %iowait %steal %idle
0.50 0.00 0.00 12.31 0.00 87.19
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 24.00 0.00 68.00 0.00 0.45 13.53 0.99 14.71 0.00 14.71 14.24 96.80
avg-cpu: %user %nice %system %iowait %steal %idle
0.75 0.00 0.50 12.31 0.00 86.43
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 27.00 0.00 75.00 0.00 0.48 13.12 1.02 13.71 0.00 13.71 12.91 96.80发布于 2016-01-05 18:18:58
INSERT太慢了吗?
innodb_flush_log_at_trx_commit = 2速度更快,但安全性稍低。INSERT ... VALUES (...), (...) ...或使用LOAD DATA。https://stackoverflow.com/questions/34606796
复制相似问题