Welcome to the Linux Foundation Forum!

LFS201 Lab 15.1 Comparing I/O Schedulers.

MarkHeathcote
MarkHeathcote Posts: 1
edited August 2020 in LFS201 Class Forum

Hi, I'm not sure of the workflow for getting the lab.iosched.sh script to run for this lab.

Im using Ubuntu 20.4 and the command to use was;

$ sudo ./lab_iosched.sh [# reads/writes (NMAX)] [file size in MB (NMEGS)]

How do I get the file into a place where Linux knows where to find it and run it?

Comments

  • heiko_s
    heiko_s Posts: 99

    Probably chmod +x lab_iosched.sh will do.

  • Note: we worked this in the Office Hours session. Need to do just 'sudo ./lab_iosched.sh' for starting. doing 'less lab_iosched.sh' will provide more information about the parameters.

    Regards,
    Luis.

  • coop
    coop Posts: 879

    Yes, you will have to make it executable probably if you downloaded in place. If you got from the "SOLUTIONS" tar ball it already is executable. Your results will depend on distro and kernel. For example I just ran it on Ubuntu 20.04 and the only IO schedulers were "mq-deadline" and "none". On RHEL 8 you have also "bfq" which is actually the default, at least for a vanilla kernel.

  • heiko_s
    heiko_s Posts: 99

    Mark: You mentioned during the office hour that you didn't manage to set sudo permissions for your default user. I sent you a private message with examples for /etc/sudoers and /etc/group configurations.

  • donquijotedelasnubes
    edited July 2

    hi @luisviveropena , I fininshed this lab, but I dont understand how to compare the results. Could you please hellp me to interpret the results of running this script? I understand that it is comparing four different I/O scheduling strategies, but the results mean what?. For example, what does this means:

    testing IOSCHED = mq-deadline
    [mq-deadline] kyber bfq none
    0.517   0.010   0.752
    

    The full output from the script on my system is like this:

    [[email protected] Downloads]$ sudo ./lab_iosched.sh 16 300
    Doing: 16 parallel read/writes on: 300 MB size files
    
    creating as needed random input files
    
    doing timings of parallel reads
    
     REAL    USER    SYS
    
    testing IOSCHED = mq-deadline
    [mq-deadline] kyber bfq none
    0.517   0.010   0.752
    testing IOSCHED = kyber
    mq-deadline [kyber] bfq none
    0.522   0.008   0.645
    testing IOSCHED = bfq
    mq-deadline kyber [bfq] none
    0.522   0.008   1.062
    testing IOSCHED = none
    [none] mq-deadline kyber bfq 
    0.527   0.011   1.072
    
    doing timings of parallel writes
    
     REAL    USER    SYS
    
    testing IOSCHED = none
    [none] mq-deadline kyber bfq 
    0.102   0.056   0.217
    testing IOSCHED = mq-deadline
    [mq-deadline] kyber bfq none
    0.091   0.033   0.216
    testing IOSCHED = kyber
    mq-deadline [kyber] bfq none
    0.094   0.043   0.220
    testing IOSCHED = bfq
    mq-deadline kyber [bfq] none
    0.102   0.035   0.140
    
  • coop
    coop Posts: 879

    Reading the lab_iosched.sh script that produces the output would tell you what the numbers are. For example the output for the write test is produced by the line:

    time do_write_test

    the three numbers are: wallclock (real) time, user (process) time, and system (kernel) time, in seconds. There are actually these three headings in the output. In hyour results there are very few differences, as can be explained by choice of hardware, linux kernel etc, and if you are on a virtual machine you may have trouble seeing the differences as it is a fake environment. On my real workstation I get:

    [email protected]:/tmp/TEMP>../lab_iosched.sh 
    Doing: 8 parallel read/writes on: 100 MB size files
    
    creating as needed random input files
    100+0 records in
    100+0 records out
    104857600 bytes (105 MB, 100 MiB) copied, 0.304284 s, 345 MB/s
    
    doing timings of parallel reads
    
     REAL    USER    SYS
    
    testing IOSCHED = mq-deadline
    [mq-deadline] kyber bfq none
    0.158   0.009   0.627
    testing IOSCHED = kyber
    mq-deadline [kyber] bfq none
    0.155   0.005   0.637
    testing IOSCHED = bfq
    mq-deadline kyber [bfq] none
    0.164   0.007   0.645
    testing IOSCHED = none
    [none] mq-deadline kyber bfq 
    0.156   0.005   0.689
    
    doing timings of parallel writes
    
     REAL    USER    SYS
    
    testing IOSCHED = none
    [none] mq-deadline kyber bfq 
    24.404   0.011   1.052
    testing IOSCHED = mq-deadline
    [mq-deadline] kyber bfq none
    25.426   0.013   1.116
    testing IOSCHED = kyber
    mq-deadline [kyber] bfq none
    25.788   0.011   0.958
    testing IOSCHED = bfq
    mq-deadline kyber [bfq] none
    23.774   0.010   0.891
    
    
    Once again not much difference.  Modern hardware such as SSD drives has rendered this kind
    of issue mostly moot except on certain kinds of situations and the deadline scheduler is almost always the
    best choice.  It is here partly just so you understand that the kernel has to make decsions about what to read and write and when and in what order
    
    

Categories

Upcoming Training