gnome-terminal benchmark

Will Cohen wcohen at redhat.com
Fri May 28 13:16:18 UTC 2004


Luciano Miguel Ferreira Rocha wrote:
> On Thu, May 27, 2004 at 04:21:38PM -0400, Will Cohen wrote:
> 
>># The actual benchmark being timed is below.
>>/usr/bin/time /bin/cat `pwd`/jarg422.txt 2>> $RESULTS_FILE
> 
> 
> You're profiling cat under gnome-terminal, not gnome-terminal + cat.
> 
> Wouldn't be better to run instead:
> /usr/bin/time gnome-terminal -x cat $PWD/jarg422.txt

You are correct that this also includes the time for the cat. I tried 
that earlier there are comments on that in the procedure. The net result 
with the suggested change on gnome-terminal is that you get the amount 
of time it takes to fire off the command to the gnome-terminal server, 
not the amount of time to complete the task. The /usr/bin/time will 
finish long before the cat is actually done. Doing something like that 
on xterm you will get gnome-terminal + cat time.

The goal of the benchmark was to make something that could provide some 
indication about the amount of time required to push a lot of text to a 
terminal window, exercise some of the gnome-terminal code, be reasonably 
easy to run, and have some chance at being repeatable. That the 
exeperiment includes time for cat is not that big an issue, so long the 
amount of time for cat stays the same and cat times don't totally 
dominate the time. If you have oprofile setup and run the benchmark with 
"--profile" you can see that xterm dominates the cpu by a large margin, 
about 75% of the samples.

Just to get an idea of the time spent on cat for the test I did the 
following on a 2.4GHz P4 with 512M memory running fc2:

$ /usr/bin/time /bin/cat /home/wcohen/jarg422.txt > /dev/null
0.00user 0.00system 0:00.57elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+106minor)pagefaults 0swaps
$ /usr/bin/time /bin/cat /home/wcohen/jarg422.txt > /dev/null
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+105minor)pagefaults 0swaps
$ /usr/bin/time /bin/cat /home/wcohen/jarg422.txt > /dev/null
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+104minor)pagefaults 0swaps
$ /usr/bin/time /bin/cat /home/wcohen/jarg422.txt > /dev/null

It probably would be a good idea to have the script run the test 
multiple times to make sure that jarg422.txt is pulled in and that the 
results are consistent.

-Will





More information about the Fedora-desktop-list mailing list