gallery.technet.microsoft.com/DiskSpd-A-Robust-Storage-6ef84e62
Microsoft Technet에서 제공하는 Windows OS 전용 I/O Workload 툴이다.
파일을 다운받아 압축을 해제 후
amd64폴더 안의 파일만 C:\temp로 옮긴다
프롬프트를 실행한다.
아래와같이 명령어를 준다.
cmd창에서 해당파일 실행 후
명령어 입력
cd 최상위 디렉토리 가기
dir 폴더 내 모든 파일 보기
diskspd.exe (실행)
diskspd.exe -c8192K -d1 testfile.dat
diskspd.exe -b4K -t2 -r -032 -d10 -Sh testfile.dat
diskspd.exe -c1G -b4K -t2 -d10 -a0,1 testfile1.dat testfile2.dat
위와 같이 뜨고,
temp폴더안에 파일 3개가 추가됨
매번 명령을 실행시킬때, 작업관리자와 같이보면 좋다?
CPU와 메모리의 변동을 보자~
아래는 diskspd.exe를 실행 했을 때의 옵션이다.
아래 Examples에 명령어실행문도 나와있다.
Available options:
-? display usage information
-ag group affinity - affinitize threads round-robin to cores in Processor Groups 0 - n.
Group 0 is filled before Group 1, and so forth.
[default; use -n to disable default affinity]
-ag#,#[,#,...]> advanced CPU affinity - affinitize threads round-robin to the CPUs provided. The g# notation
specifies Processor Groups for the following CPU core #s. Multiple Processor Groups
may be specified, and groups/cores may be repeated. If no group is specified, 0 is assumed.
Additional groups/processors may be added, comma separated, or on separate parameters.
Examples: -a0,1,2 and -ag0,0,1,2 are equivalent.
-ag0,0,1,2,g1,0,1,2 specifies the first three cores in groups 0 and 1.
-ag0,0,1,2 -ag1,0,1,2 is equivalent.
-b<size>[K|M|G] block size in bytes or KiB/MiB/GiB [default=64K]
-B<offs>[K|M|G|b] base target offset in bytes or KiB/MiB/GiB/blocks [default=0]
(offset from the beginning of the file)
-c<size>[K|M|G|b] create files of the given size.
Size can be stated in bytes or KiB/MiB/GiB/blocks
-C<seconds> cool down time - duration of the test after measurements finished [default=0s].
-D<milliseconds> Capture IOPs statistics in intervals of <milliseconds>; these are per-thread
per-target: text output provides IOPs standard deviation, XML provides the full
IOPs time series in addition. [default=1000, 1 second].
-d<seconds> duration (in seconds) to run test [default=10s]
-f<size>[K|M|G|b] target size - use only the first <size> bytes or KiB/MiB/GiB/blocks of the file/disk/partition,
for example to test only the first sectors of a disk
-f<rst> open file with one or more additional access hints
r : the FILE_FLAG_RANDOM_ACCESS hint
s : the FILE_FLAG_SEQUENTIAL_SCAN hint
t : the FILE_ATTRIBUTE_TEMPORARY hint
[default: none]
-F<count> total number of threads (conflicts with -t)
-g<bytes per ms> throughput per-thread per-target throttled to given bytes per millisecond
note that this can not be specified when using completion routines
[default inactive]
-h deprecated, see -Sh
-i<count> number of IOs per burst; see -j [default: inactive]
-j<milliseconds> interval in <milliseconds> between issuing IO bursts; see -i [default: inactive]
-I<priority> Set IO priority to <priority>. Available values are: 1-very low, 2-low, 3-normal (default)
-l Use large pages for IO buffers
-L measure latency statistics
-n disable default affinity (-a)
-N<vni> specify the flush mode for memory mapped I/O
v : uses the FlushViewOfFile API
n : uses the RtlFlushNonVolatileMemory API
i : uses RtlFlushNonVolatileMemory without waiting for the flush to drain
[default: none]
-o<count> number of outstanding I/O requests per target per thread
(1=synchronous I/O, unless more than 1 thread is specified with -F)
[default=2]
-O<count> number of outstanding I/O requests per thread - for use with -F
(1=synchronous I/O)
-p start parallel sequential I/O operations with the same offset
(ignored if -r is specified, makes sense only with -o2 or greater)
-P<count> enable printing a progress dot after each <count> [default=65536]
completed I/O operations, counted separately by each thread
-r<align>[K|M|G|b] random I/O aligned to <align> in bytes/KiB/MiB/GiB/blocks (overrides -s)
-R<text|xml> output format. Default is text.
-s[i]<size>[K|M|G|b] sequential stride size, offset between subsequent I/O operations
[default access=non-interlocked sequential, default stride=block size]
In non-interlocked mode, threads do not coordinate, so the pattern of offsets
as seen by the target will not be truly sequential. Under -si the threads
manipulate a shared offset with InterlockedIncrement, which may reduce throughput,
but promotes a more sequential pattern.
(ignored if -r specified, -si conflicts with -T and -p)
-S[bhmruw] control caching behavior [default: caching is enabled, no writethrough]
non-conflicting flags may be combined in any order; ex: -Sbw, -Suw, -Swu
-S equivalent to -Su
-Sb enable caching (default, explicitly stated)
-Sh equivalent -Suw
-Sm enable memory mapped I/O
-Su disable software caching, equivalent to FILE_FLAG_NO_BUFFERING
-Sr disable local caching, with remote sw caching enabled; only valid for remote filesystems
-Sw enable writethrough (no hardware write caching), equivalent to FILE_FLAG_WRITE_THROUGH or
non-temporal writes for memory mapped I/O (-Sm)
-t<count> number of threads per target (conflicts with -F)
-T<offs>[K|M|G|b] starting stride between I/O operations performed on the same target by different threads
[default=0] (starting offset = base file offset + (thread number * <offs>)
makes sense only with #threads > 1
-v verbose mode
-w<percentage> percentage of write requests (-w and -w0 are equivalent and result in a read-only workload).
absence of this switch indicates 100% reads
IMPORTANT: a write test will destroy existing data without a warning
-W<seconds> warm up time - duration of the test before measurements start [default=5s]
-x use completion routines instead of I/O Completion Ports
-X<filepath> use an XML file for configuring the workload. Cannot be used with other parameters.
-z[seed] set random seed [with no -z, seed=0; with plain -z, seed is based on system run time]
Write buffers:
-Z zero buffers used for write tests
-Zr per IO random buffers used for write tests - this incurrs additional run-time
overhead to create random content and shouln't be compared to results run
without -Zr
-Z<size>[K|M|G|b] use a <size> buffer filled with random data as a source for write operations.
-Z<size>[K|M|G|b],<file> use a <size> buffer filled with data from <file> as a source for write operations.
By default, the write buffers are filled with a repeating pattern (0, 1, 2, ..., 255, 0, 1, ...)
Synchronization:
-ys<eventname> signals event <eventname> before starting the actual run (no warmup)
(creates a notification event if <eventname> does not exist)
-yf<eventname> signals event <eventname> after the actual run finishes (no cooldown)
(creates a notification event if <eventname> does not exist)
-yr<eventname> waits on event <eventname> before starting the run (including warmup)
(creates a notification event if <eventname> does not exist)
-yp<eventname> stops the run when event <eventname> is set; CTRL+C is bound to this event
(creates a notification event if <eventname> does not exist)
-ye<eventname> sets event <eventname> and quits
Event Tracing:
-e<q|c|s> Use query perf timer (qpc), cycle count, or system timer respectively.
[default = q, query perf timer (qpc)]
-ep use paged memory for the NT Kernel Logger [default=non-paged memory]
-ePROCESS process start & end
-eTHREAD thread start & end
-eIMAGE_LOAD image load
-eDISK_IO physical disk IO
-eMEMORY_PAGE_FAULTS all page faults
-eMEMORY_HARD_FAULTS hard faults only
-eNETWORK TCP/IP, UDP/IP send & receive
-eREGISTRY registry calls
Examples:
Create 8192KB file and run read test on it for 1 second:
diskspd.exe -c8192K -d1 testfile.dat
Set block size to 4KB, create 2 threads per file, 32 overlapped (outstanding)
I/O operations per thread, disable all caching mechanisms and run block-aligned random
access read test lasting 10 seconds:
diskspd.exe -b4K -t2 -r -o32 -d10 -Sh testfile.dat
Create two 1GB files, set block size to 4KB, create 2 threads per file, affinitize threads
to CPUs 0 and 1 (each file will have threads affinitized to both CPUs) and run read test
lasting 10 seconds:
diskspd.exe -c1G -b4K -t2 -d10 -a0,1 testfile1.dat testfile2.dat
C:\temp>diskspd.exe -c8192K -d1 testfile.dat
WARNING: Error adjusting token privileges for SeManageVolumePrivilege (error code: 1300)
WARNING: Could not set privileges for setting valid file size; will use a slower method of preparing the file
Command Line: diskspd.exe -c8192K -d1 testfile.dat
3. Diskspd 주요 옵션
- ‘diskspd.exe /?’ 명령을 이용하여 전체 옵션을 확인할 수 있습니다.
- 주로 사용하는 예시 구문 : diskspd.exe -c20g -d300 -w75 -t8 -o16 -b4k -r -h -L -D D:\IO1.DAT >> %DISKSPD%-r25.csv
└ 추후 자료 정리 등을 위한 csv파일로 출력하는 구문입니다.
-c |
diskspd 수행시 생성 및 사용하는 파일 크기 |
-d |
테스트 수행 시간(초) |
-w |
write 비율 (ex. w75의 경우 read 25% / write 75% |
-t |
파일당 thread 개수 |
-o |
뛰어난 IOs 또는 thread 당 큐 길이. 더 많은 IOPS 및 처리량을 얻기 위한 옵션 |
-b |
IO 크기 |
-r |
순차 thread 수행이 아닌 랜덤 수행 |
-h |
하드웨어 및 소프트웨어 캐싱 사용 안함 |
-L |
대기시간 정보 캡쳐 |
-D |
ms 간격으로 IOPS 통계 캡쳐 |
m.blog.naver.com/kangcgon/221754319476
'Database > 이론' 카테고리의 다른 글
RAID (0) | 2020.11.18 |
---|---|
tpmc (0) | 2020.11.18 |
NTFS와 exFAT (0) | 2020.11.18 |
DB 기본? 설정값 (0) | 2020.11.18 |
가상 하드디스크 만들어서 mssql 저장 공간으로 지정하기 (0) | 2020.11.17 |