因磁盘IO性能低导致程序An I/O error 报错

张开发
2026/4/16 10:15:32 15 分钟阅读

分享文章

因磁盘IO性能低导致程序An I/O error 报错
文章目录环境症状问题原因解决方案环境系统平台UOS鲲鹏版本4.5.8症状1、程序出现如下报错1、An I/O error occurred while sending to the backend 2、JDBC rollback;This connection has been closed.;nested exception is com.highgo.jdbc.util.PSQLException:This connection has beenclosed.问题原因1、经过了解程序查询一张2000万的表只要操作的人多了就会出现相关报错2、数据库运行在机械盘上vmstat对服务器磁盘进行监控输出信息如下vmstat监控b列等待I/O的阻塞进程数过多考虑机械盘升级固态。解决方案1、与客户讨论提供如下解决方案方案12千万的表进行拆表。方案2升级磁盘硬件配置方案3读写分离提升多大是否满足需求有待验证2、客户决定采用升级磁盘硬件解决3、测试新升级磁盘正常01、fio随机写fio -direct1 -iodepth128 -rwrandwrite -ioenginelibaio -bs4k -size1G -numjobs1 -runtime1000 -group_reporting -filename/hgdata/testdir/fiotestfile -nameRand_Write_Testing02、fio随机读fio -direct1 -iodepth128 -rwrandread -ioenginelibaio -bs4k -size1G -numjobs1 -runtime1000 -group_reporting -filename/hgdata/testdir/fiotestfile -nameRand_read_Testing03、dd测速8kb读写写测速 time dd if/dev/zero ofoutput1.file bs8k count128000 oflagdirect,nonblock 读测速 time dd ifoutput1.file of/dev/null bs8k count128000 iflagdirect,nonblock04、dd小文件写不满足20MB/s磁盘性能不达标dd if/dev/zero of/hgdata/testio1 bs32k count20k oflagdsync05、dd大文件写不满足200MB/s磁盘性能不达标dd if/dev/zero of/hgdata/testio2 bs8192k count100 oflagdsync

更多文章