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/248/trackback
    List of Articles
    번호 제목 글쓴이 날짜 조회 수sort
    347 mrtg를 이용한 시스템자원 모니터링 ADMINPLAY 2012-01-16 39071
    346 tomcat log 쌓이는 것 방지하기 ADMINPLAY 2011-02-17 38075
    345 하드디스크 정보보기 smartctl ADMINPLAY 2011-08-17 36024
    344 ffmpeg 설치 및 활용 ADMINPLAY 2012-02-07 35508
    343 우분투 서버 방화벽. 외부에서 ssh 접속이 안되었다.(Ubun... l2zeo 2010-02-20 34890
    342 mount -o remount,rw / ADMINPLAY 2010-05-03 33796
    341 3Ware Controller Problem Determination Procedures (레... ADMINPLAY 2012-01-16 33392
    340 [Ubuntu] 부팅시 시작되는 데몬 관리하기 – update-rc.d ADMINPLAY 2013-03-05 33229
    » 리눅스 IO 스케쥴러 변경하기 ADMINPLAY 2010-12-13 33177
    338 HTTP Live Streaming 구축 ADMINPLAY 2012-02-07 33148
    337 시스칼리지- 꿔니님의 클러스트링 강좌 l2zeo 2010-03-08 32759
    336 리눅스 서버 부하 점검 - htop 소스설치 file [3] ADMINPLAY 2010-09-12 32559
    335 가상화 (XEN & KVM) 리눅스 - CentOS 5.4 에서 XEN 설치 file ADMINPLAY 2010-03-24 32444
    334 Cent OS-5.2 설치 문서 file l2zeo 2010-02-24 31794
    333 FFMpeg + rtspdump + segmenter 를 이용한 iPhone 스트리... ADMINPLAY 2012-02-07 31367
    332 Apache 설치(Ubuntu Server DIY ) l2zeo 2010-02-20 31090
    331 Dstat - 모니터링 file ADMINPLAY 2009-10-30 30686
    330 ruby on rails 설치 (Ubuntu Server DIY ) l2zeo 2010-02-20 30429
    329 CentOS 5.3에서 samba구축방법 file l2zeo 2010-03-08 29451
    328 [Linux_CentOS_5.5] 텍스트 모드(Text mode)에서 해상도 변경 file ADMINPLAY 2011-02-11 29206

    Copyright ADMINPLAY corp. All rights reserved.

    abcXYZ, 세종대왕,1234

    abcXYZ, 세종대왕,1234