kernel performance issue
From: richard
Date: Thu Jul 31 2008 - 06:53:46 EST
Hi:
I have a question about the kernel performance of kernel 2.6.24. I use
"time"
to account the time cost of "date" execution, and find that the "real time"
of kernel 2.6.24 is always bigger than kernel 2.6.21 on my arm board.
For my
understanding, the time cost of 2.6.24 shouldn't be bigger than 2.6.21,
because
it is a upgrade of 2.6.21 and the its performance should be better than
2.6.21,
if I am wrong please let me know.
[root@Linux /root]#cat ./date-loop.sh
#! /bin/sh
loop=1
while [ $loop -le 50 ]
do
date +%s
loop=$(($loop+1))
done
Time cost in kernel 2.6.24:
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.06s
sys 0m 0.43s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.07s
sys 0m 0.42s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.09s
sys 0m 0.40s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.07s
sys 0m 0.41s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.07s
sys 0m 0.42s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.09s
sys 0m 0.40s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.06s
sys 0m 0.43s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.08s
sys 0m 0.41s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.09s
sys 0m 0.40s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.10s
sys 0m 0.39s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.05s
sys 0m 0.44s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.05s
sys 0m 0.44s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.09s
sys 0m 0.40s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.07s
sys 0m 0.42s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.07s
sys 0m 0.42s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.48s
user 0m 0.09s
sys 0m 0.40s
[root@Linux /root]#
Time cost in kernel 2.6.21:
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.08s
sys 0m 0.38s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.07s
sys 0m 0.39s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.08s
sys 0m 0.38s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.06s
sys 0m 0.40s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.10s
sys 0m 0.36s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.04s
sys 0m 0.42s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.07s
sys 0m 0.39s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.08s
sys 0m 0.38s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.10s
sys 0m 0.36s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.09s
sys 0m 0.37s
[root@Linux /root]#time ./date-loop.sh > /dev/null
real 0m 0.45s
user 0m 0.07s
sys 0m 0.39s
[root@Linux /root]#
--
Best Regards,
Yang Lu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/