Closed8

Disc IO 速度調査

Disc IO が遅いのかどうか確認したいので、とりあえず超適当に測る

Keycloak

M1

# uname -m
aarch64

Write

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 0.149956 s, 1.4 GB/s

Read

# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 0.366021 s, 573 MB/s

Intel

# uname -m
x86_64

Write

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 0.321099 s, 653 MB/s

Read

# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 0.442607 s, 474 MB/s

Laravel

M1

# uname -m
aarch64

Write

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 3.32979 s, 63.0 MB/s

Read

# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 4.798 s, 43.7 MB/s

Intel

# uname -m
x86_64

Write

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 1.88389 s, 111 MB/s

Read

# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 3.86122 s, 54.3 MB/s

Mac

M1

 uname -m
arm64

Write

 dd if=/dev/zero of=out bs=4000000 count=50
200000000 bytes transferred in 0.093801 secs (2132172941 bytes/sec)

Read

 dd if=out of=/dev/null
200000000 bytes transferred in 0.232721 secs (859397830 bytes/sec)

Intel

$ uname -m                                                                                                                                                                                                                                                              develop
x86_64

Write

$ dd if=/dev/zero of=out bs=4000000 count=50                                                                                                                                                                                                                            develop
200000000 bytes transferred in 0.084071 secs (2378943846 bytes/sec)

Read

$ dd if=out of=/dev/null                                                                                                                                                                                                                                                develop
200000000 bytes transferred in 0.542150 secs (368901581 bytes/sec)

テストに使ったサイズも適当だし、オプションも適当
あくまで目安

M1

Machine Write ( MB/s ) Read ( MB/s )
Keycloak 1400 600
Laravel 60 40
Mac 2000 900

Intel

Machine Write ( MB/s ) Read ( MB/s )
Keycloak 650 500
Laravel 120 50
Mac 2400 360

Laravel で使ってる PHP イメージ自体は悪くないのかな?

速い

 docker run -it php:8.0-fpm-buster bash

# uname -m
aarch64

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 0.373248 s, 562 MB/s

# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 0.357616 s, 586 MB/s

あー、マウント領域が遅いのかも?

root@f6367253e1af:/work/src# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          59G   45G   11G  81% /
tmpfs            64M     0   64M   0% /dev
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
shm              64M     0   64M   0% /dev/shm
grpcfuse        229G  144G   58G  72% /work/src
/dev/vda1        59G   45G   11G  81% /etc/hosts
tmpfs           2.0G     0  2.0G   0% /sys/firmware
# cd /sys/fs/cgroup/

# dd if=/dev/zero of=out bs=4M count=50 conv=fdatasync
209715200 bytes (210 MB, 200 MiB) copied, 0.110411 s, 1.9 GB/s


# dd if=out of=/dev/null
209715200 bytes (210 MB, 200 MiB) copied, 0.321081 s, 653 MB/s

fm...

Disc が遅いのなら、きっとこれも他の人より遅いのだろう

# date +"%Y/%m/%d %H:%M:%S"; composer install > /dev/null 2>&1; date +"%Y/%m/%d %H:%M:%S"
2021/10/13 14:34:35
2021/10/13 14:35:57
このスクラップは5ヶ月前にクローズされました
作成者以外のコメントは許可されていません