Skip to content

리눅스 IO 스케쥴러 변경하기

조회 수 33177 추천 수 0 2010.12.13 16:32:31

현재 리눅스에서 제공되는 IO 스케쥴러는 아래의 4가지가 기본으로 제공된다.

 

  • Completely Fair Queuing?elevator=cfq (default)
  • Deadline?elevator=deadline
  • NOOP?elevator=noop
  • Anticipatory?elevator=as

     

    IO 스케쥴러에 대한 변경은 부팅시와 런타임 모두 가능하며 현재 default로 지정된 IO 스케쥴러의 확인은

     /sys/block/sda/queue/scheduler 에서 살펴볼 수 있다.

     # cat scheduler
    anticipatory deadline [cfq]

    출력값에서 [ ] 안의 스케쥴러가 현재 사용중인 스케쥴러이다. 따라서 cfq가 디폴드 스케쥴러로 되어있음을

    알수 있다.

     

    부팅 타임시에 변경은 /etc/grub.conf 의 kernel 옵션을 아래와 같이 추가함으로써 가능하다.

     

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/sda2
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Booyo Server (2.6.16-404.BS2smp)
            root (hd0,0)
            kernel /vmlinuz-2.6.16-404.BS2smp ro root=LABEL=/12 rhgb quiet elevator=cfq
            initrd /initrd-2.6.16-404.BS2smp.img
    title Booyo Server-up (2.6.16-404.BS2)
            root (hd0,0)
            kernel /vmlinuz-2.6.16-404.BS2 ro root=LABEL=/12 rhgb quiet elevator=noop
            initrd /initrd-2.6.16-404.BS2.img


     

    런타임시에 변경은  /sys/block/sda/queue/scheduler의 파일 내용을 아래와 같이 직접 write 함으로써 가능하다.

    단순히 변경하고자 하는 스케쥴러의 이름을 echo 시키면 반영된다.

     

    # cd /sys/block/sda/queue

    # echo anticipatory > scheduler
    # cat scheduler
    [anticipatory] deadline cfq noop

  • profile

    일요일은 짜빠게뤼~ 먹는날~^^

    엮인글 :
    http://adminplay.com/32146/c8f/trackback
    List of Articles
    번호 제목 글쓴이 날짜 조회 수sort
    347 Linux Command 로 Mysql table drop 방법 ADMINPLAY 2014-04-07 5701
    346 What are the bandwidth requirements for running a BigB... ADMINPLAY 2013-05-06 5920
    345 ctime, mtime, atime 다른 점 설명 ADMINPLAY 2014-02-07 5953
    344 리눅스에서 GNU Parted로 4K 섹터 디스크 파티션 정렬하기 ADMINPLAY 2016-06-02 6007
    343 gcc Library 경로 지정 ADMINPLAY 2014-04-07 6013
    342 Installing NGINX, PHP, and MySQL on Ubuntu 10.04 LTS u... ADMINPLAY 2013-04-11 6020
    341 Strace - 시스템콜과 신호 추적 file ADMINPLAY 2014-02-25 6046
    340 vimrc 설정 file ADMINPLAY 2014-03-01 6088
    339 웹서버 트래픽 시각화 logstalgia l2zeo 2013-05-03 6090
    338 특정 데몬의 메모리 점유율 확인하기 ADMINPLAY 2013-05-12 6131
    337 CentOS 5.6 + NginX 0.8.54 + Django 1.3 (FastCGI) + Pyt... ADMINPLAY 2014-03-28 6169
    336 telnet 과 ssh 의 차이점 ADMINPLAY 2014-03-01 6459
    335 ModSecurity 로그파일의 사이즈가 너무 큰데 이를 날짜나 ... file ADMINPLAY 2013-12-29 6536
    334 웹 언어별 no-cache 리스트 ADMINPLAY 2013-04-22 6641
    333 Hamlet 은 “웹서버 모니터링 오픈소스 솔루션” 입니다. ADMINPLAY 2014-07-07 6696
    332 우분투 네트웍크 설정 ADMINPLAY 2012-10-30 6728
    331 OS X 매버릭스가 NAS, 윈도우 PC 등 SMB 장비에 연결하지 ... ADMINPLAY 2014-03-04 6740
    330 Squid 의 캐시 저장 기간 설정 ( refresh_pattern ) ADMINPLAY 2012-05-18 6873
    329 vi 이미 읽은 파일의 인코딩 변경하기 ( euc-kr 로 encodi... ADMINPLAY 2014-05-31 6909
    328 ZFS 로 SSD 캐쉬 RAID ISCSI 노하드 서버 쉽게 만들자 ADMINPLAY 2016-05-17 6945

    Copyright ADMINPLAY corp. All rights reserved.

    abcXYZ, 세종대왕,1234

    abcXYZ, 세종대왕,1234