pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_alternatives, Darwin and locale



> reading from a pipe is much slower than reading from a regular file.

0 ~>dd if=/dev/zero bs=1k count=1000000 of=file.tmp
1000000+0 records in
1000000+0 records out
1024000000 bytes transferred in 28.915 secs (35414144 bytes/sec)
0 ~>time cat file.tmp | cat >/dev/null 
    8.31s real     0.07s user     7.97s system 
0 ~>time cat file.tmp | cat >/dev/null 
    8.44s real     0.17s user     7.86s system
0 ~>time cat file.tmp | cat >/dev/null  
    8.27s real     0.11s user     7.89s system
0 ~>time cat file.tmp >/dev/null 
    4.17s real     0.00s user     4.12s system
0 ~>time cat file.tmp >/dev/null 
    4.21s real     0.02s user     4.10s system
0 ~>time cat file.tmp >/dev/null 
    4.15s real     0.02s user     4.09s system
0 ~>uname -a
NetBSD chen.chizhovka.net 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #0: Wed Jul 16 
00:28:58 EEST 2008  
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
0 ~>

======================================================

0 ~>dd if=/dev/zero bs=1k count=1000000 of=file.tmp
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 43.9907 seconds, 23.3 MB/s

0 ~>time cat file.tmp | cat >/dev/null 

real    0m39.813s
user    0m0.176s
sys     0m3.044s

0 0 ~>time cat file.tmp | cat >/dev/null

real    0m34.587s
user    0m0.156s
sys     0m2.776s

0 0 ~>time cat file.tmp | cat >/dev/null

real    0m37.321s
user    0m0.212s
sys     0m3.260s

0 0 ~>time cat file.tmp >/dev/null

real    0m33.960s
user    0m0.076s
sys     0m1.648s

0 ~>time cat file.tmp >/dev/null

real    0m34.946s
user    0m0.048s
sys     0m1.584s

0 ~>time cat file.tmp >/dev/null

real    0m35.728s
user    0m0.088s
sys     0m1.712s

0 ~>uptime
 22:47:47 up 8 days, 10:56, 38 users,  load average: 4.02, 4.29, 3.62

0 ~>uname -a
Linux chel 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux

0 ~>

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index