Re: 2 CPUs and ps/top -- question
I found an answer to my question from one of my colleagues. This
seems like a good thing to know so I'll post it in case anyone is
interested. Here is he how checks to see how well his SMPing is working:
(incidentally, these are benchmarks for a Debian 2.0 system running kernel
2.0.35 on a dual PII-333)
Basically, we make Perl count to one million in two seperate processes,
simultaneously. For two processes on a two processor machine, the CPU
usage should be close to 100% for each process, assuming that the machine
is lightly loaded, meaning that each process is running on a seperate CPU
since it isn't possible to have 200% usage on one CPU. :)
time perl -e 'for($i=0;$i<10000000;$i++){}' &
*** Results
1.200u 11.550s 0:12.78 99.7% 0+0k 0+0io 227pf+0w
time perl -e 'for($i=0;$i<10000000;$i++){}' & \
time perl -e 'for($i=0;$i<10000000;$i++){}' &
*** Results
0.000u 12.750s 0:12.81 99.5% 0+0k 0+0io 227pf+0w
12.730u 0.070s 0:12.91 99.1% 0+0k 0+0io 227pf+0w
time perl -e 'for($i=0;$i<10000000;$i++){}' & \
time perl -e 'for($i=0;$i<10000000;$i++){}' & \
time perl -e 'for($i=0;$i<10000000;$i++){}' & \
time perl -e 'for($i=0;$i<10000000;$i++){}' &
*** Results
0.000u 12.750s 0:25.26 50.4% 0+0k 0+0io 227pf+0w
12.130u 0.640s 0:25.28 50.5% 0+0k 0+0io 227pf+0w
0.690u 12.070s 0:25.58 49.8% 0+0k 0+0io 227pf+0w
12.720u 0.080s 0:25.58 50.0% 0+0k 0+0io 227pf+0w
-Ossama
--
Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
Reply to: