On Thu, 13 Dec 2018 13:42:24 +0100
Paolo Valente <paolo.valente(a)linaro.org> wrote:
To test the behavior of your system, why don't you check, e.g.,
how
long it takes to start an application while there is some background
I/O?
A super quick way to do this is
git clone
https://github.com/Algodev-github/S
cd S/comm_startup_lat
sudo ./comm_startup_lat.sh <scheduler-you-want-to-test> 5 5 seq 3
"replay-startup-io gnometerm"
The last command line
- starts the reading of 5 files plus the writing of 5 other files
- replays, for three times, the I/O that gnome terminal does while;
starting up (if you want I can tell you how to change the last
command line so as to execute the original application, but you would
get the same results);
- for each attempt, measures how long this start-up I/O takes to
complete.
Just a note: I would feel a lot more comfortable with this utility if
it didn't have to run as root. Paranoia. Could you add the
functionality that if it is run as a normal user, it tests the I/O
scheduling scheme currently enabled. That is, it checks if it is
running as root. If it isn't, it just uses whatever I/O scheduler is
currently set, ignoring any parameter on the command line. Running as
root, it behaves exactly as it does now.
The user would be responsible for issuing the
echo <scheduler-you-want-to-test> >
/sys/block/<device-you-want-to-test>/queue/scheduler
as root if they wanted to run as a normal user.