Mailinglist Archive: opensuse-bugs (19855 mails)
| < Previous | Next > |
[Bug 387347] New: pipe uses only 2 CPU on dual-core ("zcat | wc")
- From: bugzilla_noreply@xxxxxxxxxx
- Date: Tue, 6 May 2008 11:34:18 -0600 (MDT)
- Message-id: <bug-387347-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=387347
User koenig@xxxxxxxx added comment
https://bugzilla.novell.com/show_bug.cgi?id=387347#c381873
Summary: pipe uses only 2 CPU on dual-core ("zcat | wc")
Product: openSUSE 11.0
Version: Factory
Platform: x86-64
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Kernel
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: koenig@xxxxxxxx
QAContact: kernel-maintainers@xxxxxxxxxxxxxxxxxxxxxx
Found By: ---
as a side result from bug #381873 I got some bad performace for a small pipe on
my IBM T60 using intel T7200 core2duo cpu, only one cpu core gets used:
harald > zcat /var/lib/pin/ARCHIVES.gz | LC_ALL=C time wc
3331696 30052221 535205599
0:09.43 real, 4.50 user, 0.13 sys, 49% cpu
top shows that gzip and wc take about the same about of cpu-time, both around
50%.
running xosview shows that CPU0 and CPU1 frequently get changed/used, both show
more or less random usage pattern.
if I use "zcat | bzip2 > /dev/null" then bzip2 uses 90+ % cpu because it's much
more cpu bound...
why does "zcat | wc" run "so slow" (doesn't use both CPUs for this pipe) ???
here is the last data for this report for the pipe issue:
using "cat" instead of "wc"
harald > time zcat /var/lib/pin/ARCHIVES.gz{,,,,,,,} | LC_ALL=C time cat >
/dev/null
0:41.11 real, 0.16 user, 1.61 sys, 4% cpu
41.128 0m41.128s real, 37.850 user, 3.148 sys, 99.68 cpu
harald > time zcat /var/lib/pin/ARCHIVES.gz{,,,,,,,} | LC_ALL=C time wc >
/dev/null
1:16.89 real, 36.23 user, 1.24 sys, 48% cpu
76.902 1m16.902s real, 73.297 user, 2.608 sys, 98.70 cpu
NOTE that the 2nd line of time output shows the cpu time sums of the whole pipe
(zcat + wc),
so wc got 48% cpu and zcat the other 50%
harald > uname -a
Linux harald 2.6.25-26-default #1 SMP 2008-04-30 07:56:05 +0200 x86_64 x86_64
x86_64 GNU/Linux
what's wrong here, why not use both cores ? ;-(
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
User koenig@xxxxxxxx added comment
https://bugzilla.novell.com/show_bug.cgi?id=387347#c381873
Summary: pipe uses only 2 CPU on dual-core ("zcat | wc")
Product: openSUSE 11.0
Version: Factory
Platform: x86-64
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Kernel
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: koenig@xxxxxxxx
QAContact: kernel-maintainers@xxxxxxxxxxxxxxxxxxxxxx
Found By: ---
as a side result from bug #381873 I got some bad performace for a small pipe on
my IBM T60 using intel T7200 core2duo cpu, only one cpu core gets used:
harald > zcat /var/lib/pin/ARCHIVES.gz | LC_ALL=C time wc
3331696 30052221 535205599
0:09.43 real, 4.50 user, 0.13 sys, 49% cpu
top shows that gzip and wc take about the same about of cpu-time, both around
50%.
running xosview shows that CPU0 and CPU1 frequently get changed/used, both show
more or less random usage pattern.
if I use "zcat | bzip2 > /dev/null" then bzip2 uses 90+ % cpu because it's much
more cpu bound...
why does "zcat | wc" run "so slow" (doesn't use both CPUs for this pipe) ???
here is the last data for this report for the pipe issue:
using "cat" instead of "wc"
harald > time zcat /var/lib/pin/ARCHIVES.gz{,,,,,,,} | LC_ALL=C time cat >
/dev/null
0:41.11 real, 0.16 user, 1.61 sys, 4% cpu
41.128 0m41.128s real, 37.850 user, 3.148 sys, 99.68 cpu
harald > time zcat /var/lib/pin/ARCHIVES.gz{,,,,,,,} | LC_ALL=C time wc >
/dev/null
1:16.89 real, 36.23 user, 1.24 sys, 48% cpu
76.902 1m16.902s real, 73.297 user, 2.608 sys, 98.70 cpu
NOTE that the 2nd line of time output shows the cpu time sums of the whole pipe
(zcat + wc),
so wc got 48% cpu and zcat the other 50%
harald > uname -a
Linux harald 2.6.25-26-default #1 SMP 2008-04-30 07:56:05 +0200 x86_64 x86_64
x86_64 GNU/Linux
what's wrong here, why not use both cores ? ;-(
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
| < Previous | Next > |