In the name of Science, I deployed a fresh Linode 1024 unto newark630.
linode395992 (198.74.57.101)
Ubuntu 13.04 (x86_64), kernel 3.9.3-x86_64-linode33
Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (x8)
Commands:
Code:
apt-get update
apt-get dist-upgrade
wget -O waltz.midi http://www.tradtunedb.org.uk:8080/musicrest/genre/scandi/tune/konstan%2Bparempi%2Bvalssi-waltz/midi
vi benchmarkTimidity.sh # pasted in above snippet, added "time" before the timidity execution as per my last
apt-get install timidity-interfaces-extra
bash benchmarkTimidity.sh
I let it loop a few times, with the following output from the script, and then from vmstat:
Code:
root@li546-101:~# bash benchmarkTimidity.sh
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m2.258s
user 0m1.916s
sys 0m0.075s
Timidity took 2262 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m1.935s
user 0m1.850s
sys 0m0.078s
Timidity took 1938 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m2.053s
user 0m1.926s
sys 0m0.080s
Timidity took 2056 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m1.919s
user 0m1.832s
sys 0m0.087s
Timidity took 1922 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m1.975s
user 0m1.888s
sys 0m0.086s
Timidity took 1977 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m2.231s
user 0m2.128s
sys 0m0.096s
Timidity took 2234 ms
Playing waltz.midi
MIDI file: waltz.midi
Format: 0 Tracks: 1 Divisions: 480
Sequence: Konstan parempi valssi
Playing time: ~99 seconds
Notes cut: 0
Notes lost totally: 0
real 0m2.053s
user 0m1.963s
sys 0m0.079s
Timidity took 2056 ms
^C
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 0 275220 31856 582180 0 0 0 36 28 43 0 0 100 0
1 0 0 266408 31872 584920 0 0 8 0 590 116 5 0 94 1
1 0 0 257076 31884 593800 0 0 0 0 1017 19 12 0 87 0
0 0 0 257804 31892 599064 0 0 0 0 717 79 7 0 93 0
0 0 0 257796 31892 599064 0 0 0 0 25 17 0 0 100 0
1 0 0 266352 31896 584948 0 0 0 0 959 100 5 0 95 0
1 0 0 257548 31908 594264 0 0 0 56 1377 25 12 0 87 0
0 0 0 258392 31916 599064 0 0 0 16884 738 87 6 0 94 0
0 0 0 258392 31916 599064 0 0 0 0 14 11 0 0 100 0
1 0 0 266080 31920 585536 0 0 0 0 1094 94 6 0 94 0
1 0 0 256788 31932 594512 0 0 0 0 2034 32 12 0 87 0
0 0 0 258396 31944 598936 0 0 4 16932 1273 133 6 0 93 0
0 0 0 258396 31944 598936 0 0 0 0 24 23 0 0 100 0
1 0 0 266288 31948 585144 0 0 0 0 939 92 5 0 95 0
1 0 0 256508 31964 594592 0 0 0 0 2025 19 12 0 88 0
0 0 0 258352 31968 599064 0 0 0 16884 1299 117 6 1 94 0
0 0 0 258392 31968 599064 0 0 0 56 32 34 0 0 100 0
1 0 0 265832 31972 585784 0 0 0 0 1095 94 6 1 94 0
1 0 0 256656 31988 594820 0 0 0 0 2017 16 12 0 87 0
0 0 0 258236 31992 599064 0 0 0 16884 1224 109 6 0 94 0
0 0 0 258236 31992 599064 0 0 0 88 32 25 0 0 100 0
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 0 266412 31996 585144 0 0 0 0 1114 105 6 0 94 0
1 0 0 258616 32008 592824 0 0 0 40 2019 24 12 1 87 0
0 0 0 258456 32016 599076 0 0 0 16884 1653 119 9 0 91 0
0 0 0 258456 32016 599076 0 0 0 0 16 18 0 0 100 0
1 0 0 268024 32020 583576 0 0 0 0 656 103 3 0 97 0
1 0 0 258864 32032 592316 0 0 0 0 2016 13 12 0 87 0
0 0 0 258380 32040 599020 0 0 0 16936 1746 135 9 1 90 0
0 0 0 258272 32040 599020 0 0 0 0 19 15 0 0 100 0
0 0 0 258268 32040 599064 0 0 0 0 84 58 0 0 100 0
0 0 0 258268 32040 599064 0 0 0 0 18 13 0 0 100 0
0 0 0 258268 32040 599064 0 0 0 0 18 19 0 0 100 0
^C
Here's what I think about it:
1) It is consistently using about 1.9 seconds of CPU time to do its bidding. It's doing so on exactly one CPU, which is why the cpu.us (user CPU percentage) column in vmstat is not going above 12% or so.
2) It is also writing out a buttload of data immediately after it is done using a lot of CPU.
So let's see what I can do about #2...
Code:
mount -t tmpfs -o size=128M tmpfs /mnt
vi benchmarkTimidity.sh # change the output file to /mnt/waltz.wav
bash benchmarkTimidity.sh
Re-running it, I'm still around 1950 ms or so, but there's no huge I/O blorp and the variance has decreased a bit. I suspect your variance would decrease as well.
_________________
Code:
/* TODO: need to add signature to posts */