Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to change I/O Scheduler to Deadline in Natty?

  1. #1
    Join Date
    May 2010
    Location
    Pennsylvania
    Beans
    9
    Distro
    Ubuntu 11.04 Natty Narwhal

    How to change I/O Scheduler to Deadline in Natty?

    I wanted to try the I/O scheduler "Deadline" in Natty. The reason is after about 5-10 minutes of inactivty the system becomes temporarily unresponsive and there is constant hard drive activity. Firefox 4.0.1 is usually open but not always. After about 20 seconds I can use everything again. I have the " Alternative to 200 Line patch" and swappiness set at 10.
    I am using preload daemon, and additionally the noatime,nodiratime option in fstab. Any help here?
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2007
    Location
    Chicago, Illinois
    Beans
    688
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to change I/O Scheduler to Deadline in Natty?

    You have to edit /etc/default/grub and look for the line that starts with
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT
    Add to that line (within the quotes)
    Code:
    elevator="deadline"
    e.g.:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=off elevator=deadline"
    EDIT: Also run
    Code:
    sudo update-grub
    (As GECKYL pointed out below)

    I don't know if that will fix your issue, but that's how you change the scheduler. To find out what current scheduler you're using, you can run
    Code:
    cat /sys/block/sda/queue/scheduler
    If you've properly enabled deadline, then the output should be
    Code:
    noop [deadline] cfq
    Last edited by macaholic; July 14th, 2011 at 05:25 AM.
    System76 Gazelle Professional (GazP6)
    Intel Core i7 2820QM, 8GB DDR3, nvidia GTX 460m, OCZ Vertex 3
    System76 Starling (star4) Netbook.
    Get Dropbox!

  3. #3
    Join Date
    May 2010
    Location
    Pennsylvania
    Beans
    9
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to change I/O Scheduler to Deadline in Natty?

    Thanks! You only forgot:

    Code:
    sudo update-grub
    Last edited by GECKYL; July 13th, 2011 at 09:46 PM.

  4. #4
    Join Date
    Jan 2008
    Beans
    4,305

    Re: How to change I/O Scheduler to Deadline in Natty?

    Are you starved for memory when this happens? (Swapping?) The choice of elevator is probably not the cause of the loss of responsiveness in this situation. Also, preload tends to bunch up a lot of I/O at times which is why I have stopped using it.

    The default swappiness value of 60 is fine. For workloads with a lot of huge processes like Firefox or Virtual Machines a value of 100 might be better.

    200 line patch only isolates command line jobs into a single group so no help for this problem at all.

  5. #5
    Join Date
    May 2010
    Location
    Pennsylvania
    Beans
    9
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to change I/O Scheduler to Deadline in Natty?

    Quote Originally Posted by NightwishFan View Post
    Are you starved for memory when this happens? (Swapping?) The choice of elevator is probably not the cause of the loss of responsiveness in this situation. Also, preload tends to bunch up a lot of I/O at times which is why I have stopped using it.

    The default swappiness value of 60 is fine. For workloads with a lot of huge processes like Firefox or Virtual Machines a value of 100 might be better.

    200 line patch only isolates command line jobs into a single group so no help for this problem at all.

    I will get rid of preload and see if that helps.
    My used memory is less than 1GB when this happens. I lose responsiveness for maybe 20 seconds and the hard drive led stays completely lit. It is swap activity I am sure of it. The thing is the system monitor shows swap at 0% but then when I walk away from the computer and come back to it, it is unresponsive and the swap looks like this:
    Attached Images Attached Images
    Last edited by GECKYL; July 13th, 2011 at 10:55 PM.

  6. #6
    Join Date
    Jan 2008
    Beans
    4,305

    Re: How to change I/O Scheduler to Deadline in Natty?

    You might have a runaway task. Check the top processes that are using memory in system monitor; You should also enable view -> all processes in the case it is xorg or another root owned process eating up all the memory.

    Using deadline will probably be of little use (in my opinion CFQ is better anyway). The 20 seconds or so of unresponsiveness is normal if your machine is swapping. This is peculiar as you have very little used ram. This may mean either the process that did this was already ended or its simply swapping cache. I have seen a similar issue but have not been able to get to the bottom of it.

    Also you can tell the system to drop page-cache by running (one line at a time):
    Code:
    sudo su
    sync; echo 3 > /proc/sys/vm/drop_caches
    exit
    Please tell me if you find out what process might be needing so much memory. If there is none that fit the bill this might be a bug.


    Edit: Perhaps try this (will revert to default on a reboot). See if this helps.
    Code:
    sudo sysctl vm.overcommit_ratio=90
    Last edited by NightwishFan; July 13th, 2011 at 11:19 PM.

  7. #7
    Join Date
    May 2010
    Location
    Pennsylvania
    Beans
    9
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to change I/O Scheduler to Deadline in Natty?

    Ok it did it again.
    I tried your suggestions above before this happened. It seemed worse.
    The swap was at 400 something MB and by the time I got the screenshot it dropped down...
    Here a picture.
    Attached Images Attached Images
    Last edited by GECKYL; July 14th, 2011 at 01:02 AM.

  8. #8
    Join Date
    Jan 2008
    Beans
    4,305

    Re: How to change I/O Scheduler to Deadline in Natty?

    Hmm.. This seems to be the same issue the other fellow on Kubuntu was having. I've been looking into this one (not that I am an expert or anything) and the problem is I am never able to reproduce it on my machine. Perhaps it is an Ubuntu only bug?

    We should dub this "plenty of free ram but swaps anyway". So the overcommit_ratio tweak did nothing?

  9. #9
    Join Date
    May 2010
    Location
    Pennsylvania
    Beans
    9
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to change I/O Scheduler to Deadline in Natty?

    So the overcommit_ratio tweak did nothing?
    It seemed to have an even harder time snapping out of whatever funk it was in.
    The screensaver became jittery and it took longer this time (maybe my imagination but I doubt it) to show the desktop and become responsive.
    This has occured on many ubuntu based installs I have used. (Pinguy, Mint, etc)
    I use docky and conky and granola usually, but I don't think those would cause this. I don't even have the video card driver installed for my Radeon 4670.
    Last edited by GECKYL; July 14th, 2011 at 01:28 AM.

  10. #10
    Join Date
    Jan 2008
    Beans
    4,305

    Re: How to change I/O Scheduler to Deadline in Natty?

    Interesting. Well I am thinking this may be a bug related to the kernel. You should never be grinding to a halt with in the range of 3gb of free memory. There is not much else I can really suggest except perhaps to report a bug.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •