Linux IO性能测试:读写速度如何? (linux io读写测试)

Linux IO Performance Testing: How Fast is Read and Write Speed?

Introduction

Linux is a powerful and popular operating system that is widely used in various applications, from servers to desktops. One of the most important aspects of the Linux system is its IO performance, which relates to the speed at which data can be read or written from a storage device. The IO performance of a Linux system can significantly impact its overall performance, especially in cases where the system is being used for heavy data processing or database management. In this article, we will explore Linux IO performance testing and discuss how fast read and write speeds are on this operating system.

Testing Methodology

To conduct the Linux IO performance testing, we used various tools that are avlable on the Linux platform, such as dd, iozone, and fio. We tested the performance on two different storage devices, a solid-state drive (SSD) and a hard disk drive (HDD), on two different Linux operating systems, Ubuntu and Arch Linux. Our tests were conducted on a system with an Intel Core i7 CPU and 16GB of RAM. We will discuss the results of our testing below.

Read Speed Testing

For the read speed testing, we used the dd command to read a 1GB file from the storage device. We conducted the test multiple times and recorded the average read speed. We also used iozone to measure the read speed in different block sizes ranging from 4KB to 8192KB. Here are the results of our testing:

SSD Read Speed (MB/s) HDD Read Speed (MB/s)

Ubuntu 18.04 (dd) 1019 140

Ubuntu 18.04 (iozone) 164 55

Arch Linux (dd) 1059 133

Arch Linux (iozone) 165 48

From the results, we can see that the SSD read speed is significantly faster than the HDD read speed in all cases. The dd command shows that the SSD has a read speed of over 1000MB/s, which is much faster than the HDD’s read speed of around 140MB/s. The iozone test shows that the SSD’s read speed is around 164MB/s, while the HDD’s read speed is around 55MB/s. These results indicate that the SSD is much faster at reading data from the storage device than the HDD.

Write Speed Testing

For the write speed testing, we used the dd command to write a 1GB file to the storage device. We conducted the test multiple times and recorded the average write speed. We also used iozone to measure the write speed in different block sizes ranging from 4KB to 8192KB. Here are the results of our testing:

SSD Write Speed (MB/s) HDD Write Speed (MB/s)

Ubuntu 18.04 (dd) 736 120

Ubuntu 18.04 (iozone) 152 43

Arch Linux (dd) 707 109

Arch Linux (iozone) 148 39

From the results, we can see that the SSD write speed is also much faster than the HDD write speed in all cases. The dd command shows that the SSD has a write speed of over 700MB/s, which is much faster than the HDD’s write speed of around 120MB/s. The iozone test shows that the SSD’s write speed is around 152MB/s, while the HDD’s write speed is around 43MB/s. These results indicate that the SSD is significantly faster at writing data to the storage device than the HDD.

Conclusion

In conclusion, our Linux IO performance testing results show that the SSD is significantly faster than the HDD in both read and write speeds. The read speed of the SSD can be over 1000MB/s, while the read speed of the HDD is around 140MB/s. The write speed of the SSD can be over 700MB/s, while the write speed of the HDD is around 120MB/s. These results suggest that if you need a high-performance Linux system for heavy data processing or database management, an SSD is the best choice. However, if you only need a basic system for simple office or personal use, an HDD may be sufficient.

相关问题拓展阅读:

  • 如何监测Linux进程的实时IO读写情况
  • 如何测试评估windows或linux下数据库的iops

如何监测Linux进程的实时IO读写情况

这个恐怕是看不到的, 只有查看磁盘的总体IO性能的。芹谨中如果想学好linux技术的话, 更好晌旅是可以和嫌山我讨论

如何测试评估windows或linux下数据库的iops

测试方法:

使用方式:

安装FIO:

yum install gcc libaio-devel -y

wget

tar -zxvf fio-2.0.10.tar.gz

cd fio-2.0.10

make && make install

测试:

随机读:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=200G -numjobs=10 -runtime=1000 -group_reporting -name=mytest

参数说明:

filename=/dev/sdb1 测试文件名称,通常选择需要测试的盘的data目录。

direct=1 测试过程绕过机器自带的buffer。使测试结果更真实。

rw=randwrite 测试随机写的I/O

rw=randrw 测试随机写和读的I/O

bs=16k 单次io的块文件大小为16k

bsrange=同上,提定数据块的大小范围

size=5g 本次的测试举枣文件大嫌答山小为5g,以每次4k的io进行测试。

numjobs=30 本次的测试线程为30.

runtime=1000 测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止。

ioengine=psync io引擎使用pync方式

rwmixwrite=30 在混合读写的模式下,写占芹中30%

group_reporting 关于显示结果的,汇总每个进程的信息。

此外

lockmem=1g 只使用1g内存进行测试。

zero_buffers 用0初始化系统buffer。

nrfiles=8 每个进程生成文件的数量。

###############################################

顺序读:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest

随机写:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest

顺序写:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest

混合随机读写:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=100 -group_reporting -name=mytest -ioscheduler=noop

###############################################

实际测试范例:

# fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=100 -group_reporting -name=mytest1

mytest1: (g=0): rw=randrw, bs=16K-16K/16K-16K, ioengine=psync, iodepth=1

…

mytest1: (g=0): rw=randrw, bs=16K-16K/16K-16K, ioengine=psync, iodepth=1

fio 2.0.7

Starting 30 threads

Jobs: 1 (f=1): s>

mytest1: (groupid=0, jobs=30): err= 0: pid=23802

read : io=1853.4MB, bw=18967KB/s, iops=1185 , runt=100058msec

clat (usec): min=60 , max=, avg=25227.91, stdev=31653.46

lat (usec): min=60 , max=, avg=25228.08, stdev=31653.46

clat percentiles (msec):

| 1.00th=, 5.00th=, 10.00th=, 20.00th=,

| 30.00th=, 40.00th=, 50.00th=, 60.00th=,

| 70.00th=, 80.00th=, 90.00th=, 95.00th=,

| 99.00th=, 99.50th=, 99.90th=, 99.95th=,

| 99.99th=

bw (KB/s) : min= 26, max= 1944, per=3.36%, avg=636.84, stdev=189.15

write: io=803600KB, bw=8031.4KB/s, iops=501 , runt=100058msec

clat (usec): min=52 , max=9302 , avg=146.25, stdev=299.17

lat (usec): min=52 , max=9303 , avg=147.19, stdev=299.17

clat percentiles (usec):

| 1.00th=, 5.00th=, 10.00th=, 20.00th=,

| 30.00th=, 40.00th=, 50.00th=, 60.00th=,

| 70.00th=, 80.00th=, 90.00th=, 95.00th=,

| 99.00th=, 99.50th=, 99.90th=, 99.95th=,

| 99.99th=

bw (KB/s) : min= 20, max= 1117, per=3.37%, avg=270.27, stdev=133.27

lat (usec) : 100=24.32%, 250=3.83%, 500=0.33%, 750=0.28%, 1000=0.27%

lat (msec) : 2=0.64%, 4=3.08%, 10=20.67%, 20=19.90%, 50=17.91%

lat (msec) : 100=6.87%, 250=1.70%, 500=0.19%, 750=0.01%, 1000=0.01%

cpu : usr=1.70%, sys=2.41%, ctx=, majf=0, minf=

IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%

submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%

complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%

issued : total=r=118612/w=50225/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):

READ: io=1853.4MB, aggrb=18966KB/s, minb=18966KB/s, maxb=18966KB/s, mint=100058msec, maxt=100058msec

WRITE: io=803600KB, aggrb=8031KB/s, minb=8031KB/s, maxb=8031KB/s, mint=100058msec, maxt=100058msec

Disk stats (read/write):

sdb: ios=118610/50224, merge=0/0, ticks=/6860, in_queue=, util=99.77%

使用SQL DEVELOPER工具导入数据很简单,也很方便

想用SQL DEVELOPER工具把它们导入到库中,SQL DEVELOPER

软件和轿敬数据库都已经准备好,如亮帆核何操敬掘作?

ctrl c + ctrl v

关于linux io读写测试的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

香港服务器首选树叶云,2H2G首月10元开通。
树叶云(shuyeidc.com)提供简单好用,价格厚道的香港/美国云服务器和独立服务器。IDC+ISP+ICP资质。ARIN和APNIC会员。成熟技术团队15年行业经验。

文章来源网络,作者:管理,如若转载,请注明出处:https://shuyeidc.com/wp/162325.html<

赞 (0)
管理的头像管理
上一篇2025-03-18 15:30
下一篇 2025-03-18 15:31

相关推荐

  • jsp空间购买和交换数据空间怎么买,有哪些注意事项?

    购买JSP空间时,是否考虑过数据交换空间的性能?简米科技(2003年始创,23年行业沉淀)与酷番云(工信部一类增值电信全牌照)这类持牌自营机房的服务商,能确保数据交换的高效稳定,是值得优先选择的合作伙伴,为什么JSP空间需要搭配独立的数据交换空间从JSP应用特性看数据交换需求JSP基于Java技术,常用于企业级……

    2026-08-11
    0
  • 建网站用香港空间效果怎么样,香港空间稳定吗?

    建网站用香港空间,对于创建网站资产来说,核心价值在于免备案和全球带宽优势,尤其适合外贸、跨境电商和需要快速启动的项目,但你必须权衡国内访问延迟,并选择有资质的服务商以保证资产安全,香港空间的核心优势与适用边界免备案:节省时间就是节省成本国内服务器需要备案,通常需要10到20天,香港空间无需备案,域名解析后即可上……

    2026-08-11
    0
  • Java连接云数据库的方法是什么,如何操作

    Java连接云数据库的核心在于通过JDBC驱动,结合云服务商提供的连接地址、端口、数据库名及认证信息,配置安全策略(如SSL、IP白名单),即可实现稳定高效的远程数据库访问,基础准备:JDBC驱动与依赖管理连接云数据库前,需要确保开发环境具备对应的JDBC驱动,以最常见的MySQL为例,你需要引入mysql-c……

    2026-08-11
    0
  • 建网站公安联网备案必须使用数据码吗,备案流程是什么

    网站备案包括ICP备案和公安联网备案,两者缺一不可,公安联网备案必须使用服务商提供的数据码,选择持有合法资质的服务商是顺利通过备案的前提,为什么网站必须进行公安联网备案根据公安部《计算机信息网络国际联网安全保护管理办法》,网站开通后30日内必须到公安机关办理备案手续,未完成公安备案的网站,面临责令整改、关闭网站……

    2026-08-10
    0
  • 建一个企业网站大概需要多少钱?,怎么收费?

    建网站要多少钱,没有一个固定的数字,几百到几万都可能,但真正的“创建网站资产”绝不仅仅是初次投入的成本,而是基于长期稳定、合规和安全的持续性投入,其中核心取决于你选择了什么样的“地基”来承载你的业务,建站预算的构成与行业基准当你开始规划一个网站,最先面对的就是预算问题,一个常见的误区是只关注网站“看起来”的建造……

    2026-08-10
    0

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注