Saturn

The devil is in the details.

0%

Something about linux core

内存管理

  1. 页:MMU管理的基本单位

  2. 区:

    1. ZONE_DMA

    2. ZONE_DMA32

    3. ZONE_NORMAL

    4. ZONE_HIGHEM

      ![image-20211227135455605](/Users/chenjiawei/Library/Application Support/typora-user-images/image-20211227135455605.png)

块IO

  1. 块设备中最小的可寻址单元是山区们一般为512字节。块设备无法对比扇区还小的单元进行寻址和操作。因为各种软件的用途不同,所以它们都会用到自己的最小逻辑可寻址单元–块。块是文件系统的一种抽象–只能基于块来访问文件系统。虽然物理磁盘寻址是按照扇区进行的,但是内核执行的所有磁盘操作都是按照块进行的。对块大小的最终要求是必须是扇区大小的2的整数倍,并且要小于页面的大小,所以通常块大小是512字节,1KB或者4KB。;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
root@kuhan-server:/home/kuhan/daos# dmg -i -l 172.20.18.168 storage scan
Hosts SCM Total NVMe Total
----- --------- ----------
172.20.18.168 0 B (0 modules) 0 B (0 controllers)
root@kuhan-server:/home/kuhan/daos# dmg -i -l 172.20.18.168 storage format
Formatting scm storage for DAOS I/O Engine instance 0 (reformat: false)
Instance 0: starting format of SCM (ram:/mnt/daos)
Instance 0: finished format of SCM (ram:/mnt/daos)
Formatting nvme storage for DAOS I/O Engine instance 0
Instance 0: starting format of file block devices [/tmp/daos-bdev]
Instance 0: finished format of file block devices [/tmp/daos-bdev]
Writing nvme config file for DAOS I/O Engine instance 0
DAOS I/O Engine instance 0 storage ready
Format Summary:
Hosts SCM Devices NVMe Devices
----- ----------- ------------
172.20.18.168 1 1
SCM @ /mnt/daos: 4.3 GB Total/4.3 GB Avail
Starting I/O Engine instance 0: /home/kuhan/daos/install/bin/daos_engine
root@kuhan-server:/home/kuhan/daos# daos_engine:0 Using legacy core allocation algorithm
MS leader running on kuhan-server
daos_engine:0 DAOS I/O Engine (v2.0.0) process 6930 started on rank 0 with 1 target, 0 helper XS, firstcore 0, host kuhan-server.

commands

Storage Operations

1
dmg storage query usage

NMMe SSD Health Monitoring

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
3.3  DAOS系统管理命令
1) 存储空间占用查询
dmg -i storage query usage
2) 健康检查
dmg -i storage query list-devices
dmg -i storage query list-pools
dmg -i storage query device-health -u 038a6076-a2e9-48ff-b4b2-1859d319c928
dmg -i storage scan --nvme-meta
dmg -i storage scan --nvme-health
3) NVMe SSD Eviction and Hotplug
dmg -i storage set nvme-faulty –uuid=
dmg -i storage replace nvme --old-uuid= --new-uuid=

4) NVMe SSD点灯
dmg -i storage identify vmd -h --uuid=

3.4 Benchmark
1)创建pool
dmg -i pool create --size=50GB
dmg -i pool list
dmg -i pool list -v
dmg -i pool query --pool=115d5112-e4db-4364-9821-48b661cef7bc
daos pool autotest --pool=115d5112-e4db-4364-9821-48b661cef7bc
2)创建container
daos cont create --pool=115d5112-e4db-4364-9821-48b661cef7bc
Successfully created container f5d39d5d-c352-4538-8a28-54d75c76c0ac
daos cont create --pool=115d5112-e4db-4364-9821-48b661cef7bc --path=/tmp/mycontainer --type=POSIX
Successfully created container 529c9361-65b3-4d7a-ba1f-b306390dcdea type POSIX
daos cont query --path /tmp/mycontainer
3)测试
export POOL=115d5112-e4db-4364-9821-48b661cef7bc
export CONT=529c9361-65b3-4d7a-ba1f-b306390dcdea
fio ./examples/dfs.fio

create pool

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
root@kuhan-server:/home/kuhan/daos# dmg -i pool create --size=10GB --label=test
Creating DAOS pool with automatic storage allocation: 10 GB total, 6,94 tier ratio
daos_engine:0 3f085ef1: pool/cont hdl uuid 2366bb3f/a41283be
3f085ef1: rank 0 became pool service leader 0
Pool created with 6.00%,94.00% storage tier ratio
-------------------------------------------------
UUID : 3f085ef1-eddb-47ed-b68f-c05cb1f7c7b7
Service Ranks : 0
Storage Ranks : 0
Total Size : 10 GB
Storage tier 0 (SCM) : 600 MB (600 MB / rank)
Storage tier 1 (NVMe): 9.4 GB (9.4 GB / rank)

root@kuhan-server:/home/kuhan/daos# dmg -i storage scan
Hosts SCM Total NVMe Total
----- --------- ----------
localhost 0 B (0 modules) 0 B (0 controllers)
root@kuhan-server:/home/kuhan/daos# daos cont create --pool=3f085ef1-eddb-47ed-b68f-c05cb1f7c7b7
Container UUID : a1c04e93-26e9-4453-9a59-72e1a33b7667
Container Type : unknown

Successfully created container a1c04e93-26e9-4453-9a59-72e1a33b7667