1. 程式人生 > >ceph bluestore bcache 磁碟對齊對於效能影響

ceph bluestore bcache 磁碟對齊對於效能影響

1. 磁碟劃分:

# for sd in a b c d e f g h i j k l m n o ; do fdisk -l /dev/sd${sd} 2>/dev/null| grep "^ 1"; done
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953525134  931.5G  Linux filesyste
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953525134  931.5G  Linux filesyste
 1         2048   1953525134  931.5G  Linux filesyste
 1         2048   1953525134  931.5G  Linux filesyste
 1         2048   1953525134  931.5G  Linux filesyste
 1         2048   1953525134  931.5G  Linux filesyste
 "
 
1         2048   1953523711  931.5G  Microsoft basic Data
" 這組資料是 4k 對齊的


"

1         2048   1953525134  931.5G  Linux filesyste
" 這組資料沒有對齊。 測試結果:

IOPS LAYTENCH(us)
15.1k 2112.19
15.6k 2046.71
13.7k 2339.70
13.6k 2345.66
15.5k 2059.83
15.8k 2022.38
13.8k 2315.19
15.4k 2073.78
2431 13159.35
14.8k 2155.26
2353 13.59ms
2463 12990.86
2484 12878.30
2483 12.88ms
2399 13.34ms


重新分割磁碟,使其 4k 對齊:

# for sd in a b c d e f g h i j k l m n o ; do fdisk -l /dev/sd${sd} 2>/dev/null| grep "^ 1"; done
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data
 1         2048   1953523711  931.5G  Microsoft basic Data 
 1         2048   1953523711  931.5G  Linux filesyste
1 2048 1953523711 931.5G Microsoft basic Data
 1         2048   1953523711  931.5G  Linux filesyste
 
 
 1         2048   1953523711  931.5G  Linux filesyste
 
 
 1         2048   1953523711  931.5G  Linux filesyste
 
 
 1         2048   1953523711  931.5G  Linux filesyste
 
 
 1         2048   1953523711  931.5G  Linux filesyste
 
 
 
 

測試結果:

IOPS LAYTENCH(us)
14.4k 2218.46
12.8k 2491.61
14.6k 2198.55
13.4k 2391.14
14.5k 2208.98
14.6k 2187.69
13.4k 2388.60
14.6k 2186.71
12.9k 2484.72
14.1k 2262.33
14.9k 2140.23
14.8k 2161.52
12.4k 2585.81
13.0k 2286.72
13.7k 2327.26


附錄:

https://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/