On Mon, Mar 18, 2002 at 02:39:09PM +0200, Malcolm Kavalsky wrote:
> 
> 
> mulix wrote:
> 
> >
> >i decided to play too. i took your code and modified it, so that the
> >tests are run seperately (since i didnt want the after effects from
> >fork's COW behaviour to affect the memcpy case). i also modified it to
> >use getrusage(). 
> >
> >here are my results:
> >
> >[mulix@alhambra tmp]$ for arg in 1 2 3; do ./b memcpy ; done ;
> >memcpy'ed    1000 blocks of size 1048576. user time: 16.070000 secs, system time: 
>0.060000 secs
> >memcpy'ed    1000 blocks of size 1048576. user time: 15.960000 secs, system time: 
>0.040000 secs
> >memcpy'ed    1000 blocks of size 1048576. user time: 15.920000 secs, system time: 
>0.060000 secs
> >[mulix@alhambra tmp]$ for arg in 1 2 3; do ./b send ; done ;
> >sent         1000 blocks of size 1048576. user time: 6.990000 secs, system time: 
>10.020000 secs
> >sent         1000 blocks of size 1048576. user time: 7.420000 secs, system time: 
>10.330000 secs 
> >sent         1000 blocks of size 1048576. user time: 7.110000 secs, system time: 
>10.380000 secs
> >
> Interesting, I compiled and ran your code with results:
> 
> memcpy'ed       1000 blocks of size 1048576. user time: 17.830000 secs, 
> system time: 0.010000 secs
> sent            1000 blocks of size 1048576. user time: 8.190000 secs, 
> system time: 5.670000 secs
> 
> The sum of user and system time is pretty much equal (just as in yours)
> 
> I then commented out the memset commands and got:
> 
> memcpy'ed       1000 blocks of size 1048576. user time: 8.900000 secs, 
> system time: 0.040000 sec
> sent            1000 blocks of size 1048576. user time: 0.000000 secs, 
> system time: 0.620000 secs
> 
> This is a dramatic difference.
> 
> Did you try this ?

based on nadav's suggestion, i added getrusage() in the server as
well. here are the results: 

[mulix@alhambra tmp]$ echo "without memsets:" ; ./b memcpy; ./b send
without memsets:
memcpy'ed       1000 blocks of size 1048576. user time: 7.980000 secs, system time: 
0.010000 secs
client sent     1000 blocks of size 1048576. user time: 0.010000 secs, system time: 
5.070000 secs
server received 1048576000 bytes. user time: 0.020000 secs, system time: 6.750000 secs

[mulix@alhambra tmp]$ echo "with memsets:" ; ./b memcpy; ./b send
with memsets:
memcpy'ed       1000 blocks of size 1048576. user time: 15.540000 secs, system time: 
0.090000 secs
client sent     1000 blocks of size 1048576. user time: 7.400000 secs, system time: 
9.560000 secs
server received 1048576000 bytes. user time: 0.040000 secs, system time: 7.670000 secs

personally, i'm very curious why the memcpy case takes so much user
time. objdump to the rescue. 
-- 
The ill-formed Orange
Fails to satisfy the eye:       http://vipe.technion.ac.il/~mulix/
Segmentation fault.             http://syscalltrack.sf.net/

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to