Blog Content

    티스토리 뷰

    MongoDB 에서 SSD DISK 사용 시 주의사항

    확인버전
        - MongoDB 3.4.2 (journal enable, chainingAllowed:1, protocolVersion:1 )
        - MongoDB 3.4.10 (journal enable, chainingAllowed:1, protocolVersion:1 )
        - configString: "cache_size=64GB,config_base=true,eviction_dirty_target=20,eviction_dirty_trigger=40,eviction_target=70,eviction_trigger=95,eviction=(threads_min=2,threads_max=4),checkpoint_sync=true

    문제사항 :
        Primary, Secondary 장비의 (SSD) disk util 수치가 Hidden Secondary (SAS) 보다 높은 현상이 확인되거나 Router의 QPS 대비 (약 7,000 ~8,000 수준에서?) util 퍼센트 율이 10%~12% 이상 발생하는 현상확인
    --> 해당 QPS 수치는 일반적으로 0~1% 정도에서 처리가 되어야 함

    검토내용 : 
        문제가 발생한 /sys/block/sdb/stat 의 기록내용을 확인하여 1초 전후를 빼보면 초당 write ms 가 나오고 다시 write대기시간/1000ms 하면 대략 Util 과 비슷함을 확인할 수 있습니다. 즉 OS 에서 DISK 로의 쓰기가 오래 걸리는 것으로 판단되어 SSD SmartPath 설정 정보를 확인하여 활성화된 상태임을 확인, 비활성화로 조치 함
    (https://www.kernel.org/doc/Documentation/block/stat.txt)

    Name units description
    ---- ----- -----------
    read I/Os requests number of read I/Os processed
    read merges requests number of read I/Os merged with in-queue I/O
    read sectors sectors number of sectors read
    read ticks milliseconds total wait time for read requests
    write I/Os requests number of write I/Os processed
    write merges requests number of write I/Os merged with in-queue I/O
    write sectors sectors number of sectors written
    write ticks milliseconds total wait time for write requests
    in_flight requests number of I/Os currently in flight
    io_ticks milliseconds total time this block device has been active
    time_in_queue milliseconds total wait time for all requests

     

    Smart Path 란?
        
    Smart Array 컨트롤러는 Logical Drive 를 생성 시 Default 설정으로 SSD (SATA/SAS 인터페이스 무관) 드라이브가 포함 되어있으면 Smart Path를 활성화 합니다. Smart Path RAID 컨트롤러의 병목을 피하기 위해 RAID 컨트롤러의 ASIC를 통하지 않고 SSD Drive로 직접 연결 됩니다.

        Smart Path 가 활성화 되면 컨트롤러의 FBWC Cache 의 기능이 비활성화 됩니다. (Cache Ratio 무관, FBWC 의 기능 자체가 비활성화 됩니다다만, Smart Path 는 읽기 성능을 극대화 하기 위한 Option 으로 쓰기 작업이 우선인 DBMS 서버에서는 Smart Path Disable 해야 합니다DBMS 와 같은 쓰기 위주의 트랜잭션이 발생 하는 시스템에서는 FBWC 캐시를 사용하지 못하기 때문에, Access time 증가 현상이 발생 할 수 있습니다.

    Smart Path 비활성화 확인 (벤더사에 따라 확인필요)

    #Slot = 0 , array b SmartPath 비활성화
    ssacli controller slot=0 array b modify ssdsmartpath=disable

    #Slot = 0, Logical Drive 2 캐시 활성화
    ssacli ctrl slot=0 ld 2 modify aa=enable

    #변경 확인
    ssacli ctrl slot=0 show config detail | grep "LD Acceleration Method"

    Array: B

    Interface Type: Solid State SATA
    Unused Space: 0 MB (0.0%)
    Used Space: 1.1 TB (100.0%)
    Status: OK
    MultiDomain Status: OK
    Array Type: Data
    Smart Path: disable // Smart Path : disable 설정으로 direct disk write 사용 제외

    Logical Drive: 2
    Size: 558.8 GB
    Fault Tolerance: 1+0
    Heads: 255
    Sectors Per Track: 32
    Cylinders: 65535
    Strip Size: 256 KB
    Full Stripe Size: 768 KB
    Status: OK
    MultiDomain Status: OK
    Caching: Enabled
    Unique Identifier: ---
    Disk Name: /dev/sdb
    Mount Points: /dbdata 558.8 GB Partition Number 1
    OS Status: LOCKED
    Logical Drive Label: ---

    Mirror Group 1:
    physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA SSD, 200 GB, OK)
    physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA SSD, 200 GB, OK)
    physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SATA SSD, 200 GB, OK)

    Mirror Group 2:
    physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SATA SSD, 200 GB, OK)
    physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SATA SSD, 200 GB, OK)
    physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SATA SSD, 200 GB, OK)

    Drive Type: Data
    LD Acceleration Method: Controller Cache // All disabled: 2GB FBWC 캐시 미사용, Controller Cache : 2GB FBWC 캐시사용

     

    Comments