Ubuntu togo系统读写性能与原生系统测试

embedded/2025/3/20 19:09:39/

我前面把一个Ubuntu环境拷贝到了一个10Gbps的硬盘盒制作了一个Ubuntu togo的系统,帖子在这里,这篇文章主要用于测试使用Ubuntu togo的系统和原生系统的性能差异。

以下是测试Ubuntu togo系统与原系统性能差异的具体方案,结合移动硬盘特性及参考资料中的关键信息整理:
我的测试的主机的信息如下:

> inxi -Fxz
System:    Kernel: 5.15.0-131-generic x86_64 bits: 64 compiler: N/A Desktop: Gnome 3.36.9 Distro: Ubuntu 20.04.6 LTS (Focal Fossa) 
Machine:   Type: Laptop System: LENOVO product: 82JQ v: Lenovo Legion R9000P2021H serial: <filter> Mobo: LENOVO model: LNVNB161216 v: SDK0T76479 WIN serial: <filter> UEFI: LENOVO v: GKCN65WW date: 01/16/2024 
Battery:   ID-1: BAT0 charge: 69.0 Wh condition: 69.0/80.0 Wh (86%) model: Celxpert L20C4PC1 status: Full Device-1: hidpp_battery_0 model: Logitech MX Keys Wireless Keyboard charge: 100% (should be ignored) status: Discharging Device-2: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3 charge: 100% (should be ignored) status: Discharging 
CPU:       Topology: 8-Core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 L2 cache: 4096 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 102200 Speed: 2746 MHz max: 3200 MHz Core speeds (MHz): 1: 2746 2: 2573 3: 2815 4: 3029 5: 3040 6: 2687 7: 3179 8: 3194 9: 3166 10: 2892 11: 2997 12: 3134 13: 2886 14: 3030 15: 2755 16: 2600 
Graphics:  Device-1: NVIDIA vendor: Lenovo driver: nvidia v: 555.42.02 bus ID: 01:00.0 Display: x11 server: X.Org 1.20.13 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa resolution: 2560x1440~60Hz, 2560x1600~60Hz OpenGL: renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 v: 4.6.0 NVIDIA 555.42.02 direct render: Yes 
Audio:     Device-1: NVIDIA driver: snd_hda_intel v: kernel bus ID: 01:00.1 Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Lenovo driver: N/A bus ID: 06:00.5 Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 06:00.6 Sound Server: ALSA v: k5.15.0-131-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 1000 bus ID: 03:00.0 IF: eno1 state: down mac: <filter> Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: 1000 bus ID: 04:00.0 IF: wlp4s0 state: up mac: <filter> IF-ID-1: br-67610ac5d589 state: down mac: <filter> IF-ID-2: br-7f68d848895d state: down mac: <filter> IF-ID-3: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.38 TiB used: 855.52 GiB (60.7%) ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2 size: 476.94 GiB temp: 32 C ID-2: /dev/nvme1n1 vendor: Crucial model: CT1000P2SSD8 size: 931.51 GiB temp: 37 C ID-3: /dev/sda type: USB model: SSK SSK Storage size: 931.51 GiB 
Partition: ID-1: / size: 915.32 GiB used: 855.52 GiB (93.5%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 54.0 C mobo: N/A gpu: nvidia temp: 43 C Fan Speeds (RPM): N/A 
Info:      Processes: 455 Uptime: 21m Memory: 31.19 GiB used: 4.50 GiB (14.4%) Init: systemd runlevel: 5 Compilers: gcc: 9.4.0 Shell: zsh v: 5.8 inxi: 3.0.38

一、性能测试维度与工具

1. 磁盘读写性能测试
  • 原因:移动硬盘的USB接口速度(如USB 3.0/3.2)和硬盘本身性能(如SATA/NVMe)直接影响系统响应速度。
  • 工具
    • fio(测试顺序/随机读写速度):
      sudo apt-get install fio
      # 测试顺序读取(1GB文件,4K块大小)
      fio --name=seq_read --rw=read --size=1G --bs=4k --direct=1
      # 测试随机写入(1GB文件,4K块大小)
      fio --name=rand_write --rw=randwrite --size=1G --bs=4k --direct=1
      
    • hdparm(快速测试读取速度):
      sudo hdparm -Tt /dev/sdX  # 替换sdX为移动硬盘设备名
      
  • 对比项:与原系统(如内置SSD/HDD)的磁盘速度差异。
2. 系统启动与响应速度
  • 启动时间
    • 使用Ubuntu togo和原系统分别冷启动,记录从按下电源键到进入桌面的时间。
  • 应用启动速度
    • 测试常用软件(如Firefox、LibreOffice)的首次启动耗时:
      time firefox  # 记录终端输出的实际时间
      
3. CPU与内存性能
  • 工具
    • sysbench(综合性能测试):
      # CPU测试(计算素数至20000)
      sysbench cpu --cpu-max-prime=20000 run
      # 内存测试(读写速度)
      sysbench memory --memory-block-size=1K --memory-total-size=10G run
      
    • Geekbench(跨平台跑分工具):
      下载Linux/Windows版,分别运行并对比分数。
4. 图形与GPU性能(如适用)
  • 工具
    • glxgears(OpenGL基础性能):
      glxgears  # 查看帧率(需安装mesa-utils)
      
    • Unigine Heaven(跨平台GPU压力测试):
      在Ubuntu和原系统(如Windows)中运行,对比帧率与稳定性。
5. 实际场景测试
  • 编译性能
    # 编译Linux内核(对比耗时)
    time make -j$(nproc)  # 在相同项目目录下执行
    
  • 文件压缩/解压
    time tar -czf test.tar.gz /large_directory  # 压缩大文件夹
    time tar -xzf test.tar.gz  # 解压对比时间
    

二、注意事项与优化建议

  1. 环境一致性

    • 确保两台系统在同一硬件上测试(如使用同一台电脑启动Ubuntu togo和原系统)。
    • 关闭后台程序,避免干扰测试结果。
  2. 移动硬盘性能瓶颈

    • USB接口速度可能限制磁盘性能,优先使用USB 3.2或雷电接口。
    • 若使用U盘制作Ubuntu togo,性能可能显著低于移动硬盘。
  3. 系统配置优化

    • Ubuntu togo建议禁用swap分区(减少外置存储读写延迟)。
    • 检查驱动兼容性(如NVIDIA显卡需安装专有驱动)。

三、参考资料支持

  • Ubuntu与硬件性能关系
    • Ubuntu对英特尔CPU优化较好,可能优于Windows(参考)。
    • 移动硬盘性能对系统流畅度影响显著(参考)。
  • 测试工具推荐
    • sysbenchGeekbench为跨平台标准工具(参考)。

通过上述测试,您可以量化Ubuntu togo与原系统的性能差异,并针对性优化(如升级硬盘盒或接口)。若测试显示磁盘性能是瓶颈,可考虑更换NVMe硬盘盒或使用雷电接口设备。

四、测试结果与分析

4.1 Ubuntu togo性能测试结果分析(顺序读取测试)
# 测试顺序读取(1GB文件,4K块大小)
> fio --name=seq_read --rw=read --size=1G --bs=4k --direct=1# 测试参数和全局信息
seq_read: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
- 测试名称:seq_read(顺序读取)。
- 读写模式:rw=read(顺序读)。
- 测试文件大小:--size=1G(生成1GB的测试文件)。
- 块大小:bs=4k(每次I/O操作读取4KB数据)。
- 直接I/O:direct=1(绕过系统缓存,直接读写磁盘)。
- I/O引擎:ioengine=psync(同步I/O,每次操作等待完成)。
- I/O队列深度:iodepth=1(每次只发1个I/O请求)。fio-3.16
Starting 1 process
seq_read: Laying out IO file (1 file / 1024MiB)# 测试进程和进度
Jobs: 1 (f=1): [R(1)][100.0%][r=46.9MiB/s][r=12.0k IOPS][eta 00m:00s]
- 进程数:1个进程执行测试。
- 实时带宽:r=46.9MiB/s(每秒读取46.9MiB)。
- 实时IOPS:r=12.0k(每秒12,000次I/O操作)。seq_read: (groupid=0, jobs=1): err= 0: pid=66537: Mon Mar 17 15:27:49 2025# 汇总性能指标read: IOPS=12.1k, BW=47.2MiB/s (49.5MB/s)(1024MiB/21702msec)- 平均IOPS:12.1k(每秒12,100次I/O操作)。- 平均带宽:47.2MiB/s(约49.5MB/s)。- 总数据量:1024MiB(1GB)在21702毫秒(约21.7秒)内完成。# 延迟(Latency)统计clat (usec): min=68, max=1252, avg=77.61, stdev= 7.45lat (usec): min=69, max=1253, avg=78.84, stdev= 7.47- 命令完成延迟(clat):从I/O提交到完成的时间。- 最小值:68微秒(μs)。- 最大值:1252微秒。- 平均值:77.61微秒。- 标准差:7.45微秒(延迟波动小,性能稳定)。- 总延迟(lat):包括I/O提交和完成的全部时间(与clat接近,因为队列深度为1)。# 延迟百分位数clat percentiles (usec):|  1.00th=[   73],  5.00th=[   74], 10.00th=[   75], 20.00th=[   75],| 30.00th=[   77], 40.00th=[   78], 50.00th=[   78], 60.00th=[   78],| 70.00th=[   78], 80.00th=[   79], 90.00th=[   80], 95.00th=[   84],| 99.00th=[   97], 99.50th=[  113], 99.90th=[  139], 99.95th=[  145],| 99.99th=[  359]- 99%的请求在97微秒内完成。- 99.99%的请求在359微秒内完成(极少延迟异常值)。# 带宽和IOPS波动bw (  KiB/s): min=47512, max=50008, per=100.00%, avg=48315.09, stdev=653.75, samples=43iops        : min=11878, max=12502, avg=12078.77, stdev=163.43, samples=43- 带宽波动:标准差653.75 KiB/s(波动小,性能稳定)。- IOPS波动:标准差163.43(波动小)。# 延迟分布lat (usec)   : 100=99.22%, 250=0.76%, 500=0.01%, 750=0.01%, 1000=0.01%- 99.22%的请求延迟小于100微秒。- 0.76%的请求延迟在100-250微秒之间。lat (msec)   : 2=0.01%# CPU和上下文切换  cpu          : usr=1.55%, sys=25.80%, ctx=262153, majf=0, minf=13- 用户态CPU占用:1.55%(处理I/O逻辑的开销)。- 内核态CPU占用:25.80%(系统处理I/O的消耗,因direct=1绕过缓存)。- 上下文切换次数:262153次(进程因I/O等待频繁切换)。# I/O队列深度和提交模式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 rwts: total=262144,0,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):READ: bw=47.2MiB/s (49.5MB/s), 47.2MiB/s-47.2MiB/s (49.5MB/s-49.5MB/s), io=1024MiB (1074MB), run=21702-21702msec# 磁盘统计(sda)
Disk stats (read/write):sda: ios=261363/254, merge=0/92, ticks=17487/65, in_queue=17580, util=99.60%- 读取I/O次数:261363次。- 磁盘利用率:99.60%(磁盘接近满载,可能是性能瓶颈)。
4.2 Ubuntu togo性能测试结果分析(顺序写入测试)
> fio --name=rand_write --rw=randwrite --size=1G --bs=4k --direct=1
rand_write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.16
Starting 1 process
rand_write: Laying out IO file (1 file / 1024MiB)
Jobs: 1 (f=1): [w(1)][100.0%][w=41.0MiB/s][w=10.5k IOPS][eta 00m:00s]
rand_write: (groupid=0, jobs=1): err= 0: pid=72630: Mon Mar 17 15:32:32 2025write: IOPS=10.3k, BW=40.1MiB/s (42.1MB/s)(1024MiB/25526msec); 0 zone resetsclat (usec): min=67, max=2822, avg=91.72, stdev=20.23lat (usec): min=69, max=2823, avg=93.00, stdev=20.24clat percentiles (usec):|  1.00th=[   84],  5.00th=[   87], 10.00th=[   88], 20.00th=[   89],| 30.00th=[   90], 40.00th=[   90], 50.00th=[   90], 60.00th=[   91],| 70.00th=[   91], 80.00th=[   92], 90.00th=[   96], 95.00th=[  103],| 99.00th=[  120], 99.50th=[  130], 99.90th=[  157], 99.95th=[  176],| 99.99th=[ 1450]bw (  KiB/s): min=38792, max=42584, per=100.00%, avg=41076.47, stdev=701.75, samples=51iops        : min= 9698, max=10646, avg=10269.12, stdev=175.44, samples=51lat (usec)   : 100=93.36%, 250=6.61%, 500=0.01%, 750=0.01%, 1000=0.01%lat (msec)   : 2=0.01%, 4=0.01%cpu          : usr=2.05%, sys=35.85%, ctx=262236, majf=0, minf=11IO 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 rwts: total=0,262144,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):WRITE: bw=40.1MiB/s (42.1MB/s), 40.1MiB/s-40.1MiB/s (42.1MB/s-42.1MB/s), io=1024MiB (1074MB), run=25526-25526msecDisk stats (read/write):sda: ios=21/261061, merge=0/2990, ticks=4/18037, in_queue=18076, util=99.67%
4.3 Ubuntu togo性能测试结果分析(hdparm测试)
> sudo hdparm -Tt /dev/sda
/dev/sda:Timing cached reads:   29112 MB in  1.97 seconds = 14742.02 MB/secHDIO_DRIVE_CMD(identify) failed: Invalid argumentTiming buffered disk reads: 2118 MB in  3.00 seconds = 705.36 MB/sec
4.4 Ubuntu togo性能测试结果分析(常用软件启动速度测试)
> time google-chrome
Opening in existing browser session.
google-chrome  0.02s user 0.03s system 67% cpu 0.074 total
> time code
code  0.17s user 0.10s system 62% cpu 0.418 total
4.5 Ubuntu togo性能测试结果分析(sysbench CPU性能测试)
> sysbench cpu --cpu-max-prime=20000 run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)Running the test with following options:
Number of threads: 1
Initializing random number generator from current timePrime numbers limit: 20000Initializing worker threads...Threads started!CPU speed:events per second:  1406.35General statistics:total time:                          10.0003stotal number of events:              14065Latency (ms):min:                                    0.70avg:                                    0.71max:                                    0.8795th percentile:                        0.73sum:                                 9962.88Threads fairness:events (avg/stddev):           14065.0000/0.00execution time (avg/stddev):   9.9629/0.00
4.6 Ubuntu togo性能测试结果分析(glxgears显卡性能测试)
> glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
301 frames in 5.0 seconds = 60.184 FPS
298 frames in 5.0 seconds = 59.549 FPS
300 frames in 5.0 seconds = 59.945 FPS
300 frames in 5.0 seconds = 59.957 FPS
297 frames in 5.0 seconds = 59.344 FPS
298 frames in 5.0 seconds = 59.541 FPS
299 frames in 5.0 seconds = 59.748 FPS
4.7 Ubuntu 原生性能测试结果分析(顺序读取测试)

不使用缓存

> fio --name=seq_read --rw=read --size=1G --bs=4k --direct=1
seq_read: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.16
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=19.4MiB/s][r=4962 IOPS][eta 00m:00s]
seq_read: (groupid=0, jobs=1): err= 0: pid=61096: Mon Mar 17 17:07:07 2025read: IOPS=4928, BW=19.3MiB/s (20.2MB/s)(1024MiB/53191msec)clat (usec): min=67, max=3902, avg=196.99, stdev=40.80lat (usec): min=68, max=3904, avg=198.36, stdev=40.80clat percentiles (usec):|  1.00th=[   76],  5.00th=[   80], 10.00th=[  200], 20.00th=[  202],| 30.00th=[  204], 40.00th=[  204], 50.00th=[  204], 60.00th=[  206],| 70.00th=[  206], 80.00th=[  208], 90.00th=[  210], 95.00th=[  215],| 99.00th=[  225], 99.50th=[  231], 99.90th=[  251], 99.95th=[  314],| 99.99th=[ 2089]bw (  KiB/s): min=19160, max=19960, per=99.98%, avg=19708.53, stdev=143.02, samples=106iops        : min= 4790, max= 4990, avg=4927.13, stdev=35.75, samples=106lat (usec)   : 100=7.08%, 250=92.81%, 500=0.08%, 750=0.01%, 1000=0.01%lat (msec)   : 2=0.01%, 4=0.01%cpu          : usr=0.83%, sys=9.47%, ctx=262154, majf=0, minf=13IO 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 rwts: total=262144,0,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):READ: bw=19.3MiB/s (20.2MB/s), 19.3MiB/s-19.3MiB/s (20.2MB/s-20.2MB/s), io=1024MiB (1074MB), run=53191-53191msecDisk stats (read/write):nvme1n1: ios=262660/758, merge=0/348, ticks=49055/119, in_queue=49230, util=99.91%

使用缓存

> fio --name=seq_read --rw=read --size=1G --bs=4k --direct=0
seq_read: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.16
Starting 1 process
Jobs: 1 (f=1)
seq_read: (groupid=0, jobs=1): err= 0: pid=62615: Mon Mar 17 17:07:40 2025read: IOPS=107k, BW=419MiB/s (439MB/s)(1024MiB/2446msec)clat (nsec): min=908, max=240603, avg=3853.35, stdev=10121.18lat (usec): min=2, max=242, avg= 5.18, stdev=10.13clat percentiles (usec):|  1.00th=[    3],  5.00th=[    3], 10.00th=[    3], 20.00th=[    3],| 30.00th=[    3], 40.00th=[    3], 50.00th=[    3], 60.00th=[    3],| 70.00th=[    3], 80.00th=[    3], 90.00th=[    3], 95.00th=[    3],| 99.00th=[   82], 99.50th=[   84], 99.90th=[   93], 99.95th=[  101],| 99.99th=[  114]bw (  KiB/s): min=423672, max=431584, per=99.96%, avg=428532.00, stdev=3395.69, samples=4iops        : min=105918, max=107896, avg=107133.00, stdev=848.92, samples=4lat (nsec)   : 1000=0.01%lat (usec)   : 2=0.75%, 4=96.96%, 10=0.62%, 20=0.06%, 50=0.03%lat (usec)   : 100=1.51%, 250=0.06%cpu          : usr=11.08%, sys=88.75%, ctx=244, majf=0, minf=11IO 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 rwts: total=262144,0,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):READ: bw=419MiB/s (439MB/s), 419MiB/s-419MiB/s (439MB/s-439MB/s), io=1024MiB (1074MB), run=2446-2446msecDisk stats (read/write):nvme1n1: ios=4054/53, merge=0/3, ticks=1292/3, in_queue=1295, util=96.57%
4.8 Ubuntu togo性能测试结果分析(顺序写入测试)

不使用缓存

> fio --name=rand_write --rw=randwrite --size=1G --bs=4k --direct=1
rand_write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.16
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][w=130MiB/s][w=33.2k IOPS][eta 00m:00s]
rand_write: (groupid=0, jobs=1): err= 0: pid=64849: Mon Mar 17 17:09:50 2025write: IOPS=32.6k, BW=127MiB/s (133MB/s)(1024MiB/8051msec); 0 zone resetsclat (usec): min=19, max=10131, avg=24.96, stdev=29.84lat (usec): min=21, max=10133, avg=26.31, stdev=29.85clat percentiles (usec):|  1.00th=[   23],  5.00th=[   24], 10.00th=[   24], 20.00th=[   24],| 30.00th=[   24], 40.00th=[   24], 50.00th=[   24], 60.00th=[   25],| 70.00th=[   25], 80.00th=[   26], 90.00th=[   28], 95.00th=[   30],| 99.00th=[   35], 99.50th=[   40], 99.90th=[   45], 99.95th=[   50],| 99.99th=[  129]bw (  KiB/s): min=122536, max=133728, per=100.00%, avg=130236.38, stdev=3490.35, samples=16iops        : min=30634, max=33432, avg=32559.06, stdev=872.56, samples=16lat (usec)   : 20=0.01%, 50=99.95%, 100=0.03%, 250=0.01%, 500=0.01%lat (usec)   : 750=0.01%lat (msec)   : 4=0.01%, 10=0.01%, 20=0.01%cpu          : usr=5.53%, sys=63.63%, ctx=262120, majf=0, minf=9IO 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 rwts: total=0,262144,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):WRITE: bw=127MiB/s (133MB/s), 127MiB/s-127MiB/s (133MB/s-133MB/s), io=1024MiB (1074MB), run=8051-8051msecDisk stats (read/write):nvme1n1: ios=105/256805, merge=0/38, ticks=27/3448, in_queue=3488, util=98.90%

使用缓存

> fio --name=rand_write --rw=randwrite --size=1G --bs=4k --direct=0
rand_write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.16
Starting 1 process
Jobs: 1 (f=1): [w(1)][-.-%][w=320MiB/s][w=81.8k IOPS][eta 00m:00s]
rand_write: (groupid=0, jobs=1): err= 0: pid=66363: Mon Mar 17 17:11:11 2025write: IOPS=82.2k, BW=321MiB/s (337MB/s)(1024MiB/3190msec); 0 zone resetsclat (nsec): min=4679, max=66559, avg=6633.45, stdev=933.32lat (nsec): min=6076, max=67467, avg=7975.00, stdev=1020.52clat percentiles (nsec):|  1.00th=[ 5792],  5.00th=[ 6048], 10.00th=[ 6176], 20.00th=[ 6240],| 30.00th=[ 6240], 40.00th=[ 6304], 50.00th=[ 6368], 60.00th=[ 6624],| 70.00th=[ 6624], 80.00th=[ 6752], 90.00th=[ 7520], 95.00th=[ 7968],| 99.00th=[ 9024], 99.50th=[10048], 99.90th=[18048], 99.95th=[25216],| 99.99th=[31104]bw (  KiB/s): min=325840, max=329808, per=99.97%, avg=328616.00, stdev=1411.19, samples=6iops        : min=81460, max=82452, avg=82154.00, stdev=352.80, samples=6lat (usec)   : 10=99.52%, 20=0.41%, 50=0.07%, 100=0.01%cpu          : usr=9.25%, sys=90.66%, ctx=326, majf=0, minf=8IO 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 rwts: total=0,262144,0,0 short=0,0,0,0 dropped=0,0,0,0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):WRITE: bw=321MiB/s (337MB/s), 321MiB/s-321MiB/s (337MB/s-337MB/s), io=1024MiB (1074MB), run=3190-3190msecDisk stats (read/write):nvme1n1: ios=65/567, merge=0/33, ticks=62/111, in_queue=174, util=6.33%
4.9 Ubuntu togo性能测试结果分析(hdparm测试)
> sudo hdparm -Tt /dev/nvme1n1p4/dev/nvme1n1p4:Timing cached reads:   29206 MB in  1.98 seconds = 14784.34 MB/secHDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for deviceTiming buffered disk reads: 1380 MB in  3.00 seconds = 459.71 MB/sec
> sudo hdparm -Tt /dev/nvme1n1p1/dev/nvme1n1p1:Timing cached reads:   29000 MB in  1.98 seconds = 14679.55 MB/secHDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for deviceTiming buffered disk reads:  14 MB in  0.01 seconds = 1473.84 MB/sec
4.10 Ubuntu togo性能测试结果分析(常用软件启动速度测试)
> time google-chrome
Opening in existing browser session.
google-chrome  0.02s user 0.02s system 58% cpu 0.068 total
> time code
code  0.17s user 0.09s system 47% cpu 0.557 total
4.11 Ubuntu togo性能测试结果分析(sysbench CPU性能测试)
> sysbench cpu --cpu-max-prime=20000 run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)Running the test with following options:
Number of threads: 1
Initializing random number generator from current timePrime numbers limit: 20000Initializing worker threads...Threads started!CPU speed:events per second:  1399.10General statistics:total time:                          10.0007stotal number of events:              13993Latency (ms):min:                                    0.70avg:                                    0.71max:                                    1.3095th percentile:                        0.73sum:                                 9960.00Threads fairness:events (avg/stddev):           13993.0000/0.00execution time (avg/stddev):   9.9600/0.00
4.12 Ubuntu togo性能测试结果分析(glxgears显卡性能测试)
> glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
298 frames in 5.0 seconds = 59.587 FPS
300 frames in 5.0 seconds = 59.953 FPS
300 frames in 5.0 seconds = 59.936 FPS
299 frames in 5.0 seconds = 59.750 FPS
299 frames in 5.0 seconds = 59.752 FPS
300 frames in 5.0 seconds = 59.944 FPS
300 frames in 5.0 seconds = 59.956 FPS

http://www.ppmy.cn/embedded/173917.html

相关文章

A SURVEY ON POST-TRAINING OF LARGE LANGUAGE MODELS——大型语言模型的训练后优化综述——第8部分——数据

8 数据集 后训练技术被精心设计以提高LLMs对特定领域或任务的适应性&#xff0c;而数据集则是这一优化过程的基石。对先前研究[457, 82]的仔细审查强调了数据的质量、多样性和相关性如何深刻影响模型的有效性&#xff0c;并经常决定后训练努力的成功与否。为了阐明数据集在此背…

VMware中Ubuntu突然网络不可用,设置中网络设置消失?抱歉,发生错误。请联系软件提供商。需要运行NetworkManager,别急,3行代码带你搞定。

ERROR错误&#xff1a; 在VWmare中使用Ubuntu系统经常会出现网络不可以&#xff0c;网络设置消失的问题&#xff0c;是不是前一天用着好好的&#xff0c;关机再开机就突然不能用了。 在终端和浏览器都没有网络 三行代码解决 &#xff1a; 重启网络&#xff0c;在终端输入&…

基于PMU的14节点、30节点电力系统状态估计MATLAB程序

“电气仔推送”获得资料&#xff08;专享优惠&#xff09; 程序简介&#xff1a; 程序采用三种方法对14节点和30节点电力系统状态进行评估&#xff1a; ①PMU同步向量测量单元结合加权最小二乘法&#xff08;WLS&#xff09;分析电力系统的电压幅值和相角状态&#xff1b; …

尚硅谷爬虫(解析_xpath的基本使用)笔记

1、xpath的基本使用 创建一个简单的HTML&#xff1a; <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>Title</title> </head> <body><ul><li>北京</li><li&…

Visual Studio Code安装配置优化全攻略:打造高效开发环境

目录 一、背景与意义 二、安装与配置基础 2.1 下载与安装 2.2 核心配置目录 三、深度优化配置指南 3.1 主题与界面优化 3.2 必装效率插件&#xff08;精选TOP10&#xff09; 3.3 性能优化设置 四、实战案例&#xff1a;前端开发环境配置 4.1 项目初始化 4.2 调试配置…

手搓智能音箱——语音识别及调用大模型回应

一、代码概述 此 Python 代码实现了一个语音交互系统&#xff0c;主要功能为监听唤醒词&#xff0c;在唤醒后接收用户语音问题&#xff0c;利用百度语音识别将语音转换为文本&#xff0c;再调用 DeepSeek API 获取智能回复&#xff0c;最后使用文本转语音功能将回复朗读出来。 …

Web3游戏行业报告

一&#xff0c;gamefi经济 什么是gamefi GameFi是一个缩写&#xff0c;它结合了游戏和去中心化金融(“DeFi”)这两个术语&#xff0c;关注的是游戏玩法如何在去中心化系统中实现货币化。对于游戏而言&#xff0c;只要开放了交易市场&#xff0c;允许玩家自由买卖&#xff0c;…

Git 常用命令完全指南:从入门到高效协作

文章需要结构清晰&#xff0c;涵盖从入门到进阶的常用命令&#xff0c;结合实例和注意事项&#xff0c;帮助用户快速掌握Git的核心功能&#xff0c;并应用到实际项目中 一、仓库初始化与基础操作 1. 创建与克隆仓库 # 初始化本地仓库 git init# 克隆远程仓库&#xff08;SSH方…