임의 읽기 IO 스토리지 성능 도구

목적



이 도구는 데이터베이스 내에서 무작위 읽기 입/출력(IO)을 생성하는 데 사용됩니다. 이 도구의 목표는 목표 IOPS를 달성하고 허용 가능한 디스크 응답 시간이 유지되도록 가능한 한 많은 작업을 구동하는 것입니다. IO 테스트에서 수집된 결과는 IO 하위 시스템에 따라 구성마다 다릅니다. 이러한 테스트를 실행하기 전에 해당 운영 체제 및 스토리지 수준 모니터링이 이후 분석을 위해 IO 성능 메트릭을 캡처하도록 구성되었는지 확인하십시오.

방법론



적은 수의 프로세스와 프로세스당 10,000회 반복으로 시작합니다. 올플래시 저장소 어레이의 경우 프로세스당 100,000회 반복을 사용합니다. 그런 다음 프로세스 수를 늘립니다. 10개의 작업에서 시작하여 10, 20, 40 등으로 증가합니다. 응답 시간이 지속적으로 10ms를 초과하거나 계산된 IOPS가 더 이상 선형 방식으로 증가하지 않을 때까지 개별 테스트를 계속 실행합니다.

참고로 8KB 및 64KB 데이터베이스 임의 읽기(캐시되지 않음)에 대한 다음 응답 시간은 일반적으로 올플래시 어레이에 허용됩니다.
  • 평균 <= 2ms
  • <= 5ms를 초과하지 않음

  • 이 도구를 사용하려면 사전 확장된 빈 IRIS.DAT 데이터베이스가 서버 메모리 크기의 최소 2배, 저장소 컨트롤러 캐시 크기의 4배 이상이어야 합니다. 읽기가 파일 시스템 캐시에 캐시되지 않도록 하려면 데이터베이스가 메모리보다 커야 합니다.

    이 도구는 메모리에서 데이터베이스 블록을 읽는 ObjectScript VIEW 명령을 사용하므로 예상한 결과를 얻지 못한 경우 모든 데이터베이스 블록이 이미 메모리에 있는 것일 수 있습니다.

    사양 및 대상



    환경 사양 및 대상으로 다음 표를 완성하십시오.


    사양
    예시


    저장
    스토리지 어레이 사양

    물리적 서버
    CPU, 메모리 사양

    가상 기기
    Red Hat Enterprise Linux 7 24 vCPU, 40GB vRAM

    데이터베이스 크기
    200GB

    공유 메모리
    거대한 페이지를 사용하여 할당된 26956MB 공유 메모리: 24000MB 글로벌 버퍼, 1000MB 루틴 버퍼

    대상 IOPS
    2000년

    목표 응답 시간
    <=5ms


    설치



    GitHub에서 PerfTools.RanRead.xml 도구를 다운로드합니다here.

    PerfTools.RanRead.xml을 USER 네임스페이스로 가져옵니다.
    USER> do $system.OBJ.Load("/tmp/PerfTools.RanRead.xml","ckf")

    Run the Help method to see all entry points. All commands are run in %SYS.

    USER> do ##class(PerfTools.RanRead).Help()
     
    InterSystems Random Read IO Performance Tool
    --------------------------------------------
    do ##class(PerfTools.RanRead).Setup(Directory,DatabaseName,SizeGB,LogLevel)
        - Creates database and namespace with the same name. The log level must be in the range of 0 to 3, where 0 is “none” and 3 is “verbose”.
    do ##class(PerfTools.RanRead).Run(Directory,Processes,Iterations)
        - Run the random read IO test.
    do ##class(PerfTools.RanRead).Stop()
        - Terminates all background jobs.
    do ##class(PerfTools.RanRead).Reset()
        - Deletes all random read history stored in ^PerfTools.RanRead*
    do ##class(PerfTools.RanRead).Export(directory)
        - Exports a summary of all random read test history to tab delimited text file.
    

    설정



    테스트할 물리적 호스트 메모리 크기의 약 2배인 ZRANREAD라는 빈(미리 확장된) 데이터베이스를 만듭니다. 빈 데이터베이스가 스토리지 컨트롤러 캐시 크기의 최소 4배인지 확인합니다. 수동으로 생성하거나 다음 방법을 사용하여 네임스페이스와 데이터베이스를 자동으로 생성할 수 있습니다.

    USER> do ##class(PerfTools.RanRead).Setup("/usr/iris/db/zranread","ZRANREAD",100,1)
     
    Creating 100GB database in /usr/iris/db/zranread/
    Database created in /usr/iris/db/zranread/
    Run %Installer Manifest...
    2016-05-23 13:33:59 0 PerfTools.RanRead: Installation starting at 2016-05-23 13:33:59, LogLevel=1
    2016-05-23 13:33:59 1 CreateDatabase: Creating database ZRANREAD in /usr/iris/db/zranread// with resource
    2016-05-23 13:33:59 1 CreateNamespace: Creating namespace ZRANREAD using ZRANREAD/ZRANREAD
    2016-05-23 13:33:59 1 ActivateConfiguration: Activating Configuration
    2016-05-23 13:34:00 1 EnableEnsemble: Enabling ZRANREAD
    2016-05-23 13:34:00 1 ActivateConfiguration: Activating Configuration
    2016-05-23 13:34:00 0 PerfTools.RanRead: Installation succeeded at 2016-05-23 13:34:00
    2016-05-23 13:34:00 0 %Installer: Elapsed time 1.066633s
    Database /usr/iris/db/zranread/ ready for testing.
    do ##class(PerfTools.RanRead).Run(directory,processes,iterations) e.g.
    do ##class(PerfTools.RanRead).Run("/usr/iris/db/zranread/",1,10000)
    

    운영



    프로세스 수를 늘리고 진행하면서 응답 시간을 기록하여 Run 메서드를 실행합니다.
    테스트가 너무 빠르거나 결과가 예상과 다른 경우 반복 횟수를 10000으로 늘립니다.

    USER> do ##class(PerfTools.RanRead).Run("/usr/iris/db/zranread",20,10000)
     
    InterSystems Random Read IO Performance Tool
    --------------------------------------------
    Starting 20 jobs in the background.
    To terminate jobs run:  do ##class(PerfTools.RanRead).Stop()
    Waiting for jobs to finish.........................
    Random read background jobs finished.
    20 processes (1000 iterations) average response time = 7.18ms
    Calculated IOPS = 2787
    

    결과



    각 실행의 결과는 SQL 테이블 PerfTools.RanRead의 USER에 저장됩니다. 다음 SQL 쿼리를 실행하여 결과 요약을 확인합니다.

    SELECT RunDate,RunTime,Database,Iterations,Processes,
        {fn ROUND(AVG(ResponseTime),2)} As ResponseTime,
        {fn ROUND(AVG(IOPS),0)} As IOPS
    FROM PerfTools.RanRead
    GROUP BY Batch
    

    결과 집합을 탭으로 구분된 텍스트 파일로 내보내려면 다음을 실행합니다.

    USER> do ##class(PerfTools.RanRead).Export("/usr/iris/db/zranread/")
     
    Exporting summary of all random read statistics to /usr/iris/db/zranread/PerfToolsRanRead_20160523-1408.txt
    Done.
    

    분석



    내보낸 텍스트 파일을 Excel에서 연 다음 차트 작성을 위해 PerfToolsRandomRead_Analysis_Template.xlsx 스프레드시트에 복사하여 붙여넣습니다.



    샘플 스프레드시트는 GitHubhere에서 다운로드할 수 있습니다.

    정리



    실행을 마친 후 테스트는 다음을 실행하여 기록을 제거합니다.

    %SYS> do ##class(PerfTools.RanRead).Reset()
    

    .

    좋은 웹페이지 즐겨찾기