Re: command piped into bzip not using all available CPU

From: Jim C. Nasby (jim_at_nasby.net)
Date: 04/19/04

  • Next message: Steven Hartland: "Re: etherchannel on 5.2.1 - possible?"
    Date: Mon, 19 Apr 2004 09:09:21 -0500
    To: Aaron Seelye <aseelye-lists@eltopia.com>
    
    

    Why would I expect to see it only use one CPU? It was CPU bound, not
    disk bound. There were two CPU-intensive processes running, why wouldn't
    they each use a different CPU?

    On Mon, Apr 19, 2004 at 12:08:32AM -0700, Aaron Seelye wrote:
    > I'm not sure the exact technical reason, but as I understand that, it's
    > 47% idle on the total cpu power of the machine, which would indicate
    > that one cpu was 100% full, and the other was 3%, due to system usage,
    > i/o, or whatever else was running. This is quite normal in my
    > experience, and what you should expect to see.
    >
    > -Aaron
    > ----- Original Message -----
    > From: "Jim C. Nasby" <jim@nasby.net>
    > To: "Aaron Seelye" <aseelye-lists@eltopia.com>
    > Cc: <freebsd-performance@freebsd.org>
    > Sent: Sunday, April 18, 2004 7:22 PM
    > Subject: Re: command piped into bzip not using all available CPU
    >
    >
    > Perhapse I didn't make it clear, but this is on a dual CPU machine. I
    > would expect that either bzip2 or pgsql would hit 100% CPU, using one
    > entire CPU. The 47% idle indicates to me that it's not.
    >
    > On Fri, Apr 16, 2004 at 03:48:19PM -0700, Aaron Seelye wrote:
    > > I would venture a guess that bzip is not multi threaded and therefore
    > > isn't spreading the load around.
    > >
    > > -Aaron Seelye
    > > ----- Original Message -----
    > > From: "Jim C. Nasby" <jim@nasby.net>
    > > To: <freebsd-performance@freebsd.org>
    > > Sent: Friday, April 16, 2004 3:05 PM
    > > Subject: command piped into bzip not using all available CPU
    > >
    > >
    > > As you can see below, a command piped into bzip2 is only effectively
    > > using one CPU. It's not disk bound, both systat and gstat report less
    > > than 10% disk utilization. Why is this?
    > >
    > > The command I'm running is:
    > > pg_dump -vZ0 ogr | bzip2 > ogr-20040416.sql.bz2
    > >
    > > last pid: 18345; load averages: 1.17, 1.09, 0.81 up 8+22:12:27
    > > 17:00:56
    > > 66 processes: 2 running, 64 sleeping
    > > CPU states: 49.4% user, 0.0% nice, 3.7% system, 0.2% interrupt,
    > 46.7%
    > > idle
    > > Mem: 67M Active, 2935M Inact, 359M Wired, 331M Cache, 255M Buf, 5576K
    > > Free
    > > Swap: 8192M Total, 64M Used, 8127M Free, 48K Out
    > >
    > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU
    > > COMMAND
    > > 17334 decibel 109 0 10856K 7164K CPU0 0 11:05 65.77% 65.77%
    > > bzip2
    > > 17335 pgsql 4 0 154M 124M sbwait 0 5:54 34.03% 34.03%
    > > postgres
    > > 17333 decibel -8 0 20128K 3236K pipdwt 0 0:46 2.88% 2.88%
    > > pg_dump
    > > --
    > > Jim C. Nasby, Database Consultant jim@nasby.net
    > > Member: Triangle Fraternity, Sports Car Club of America
    > > Give your computer some brain candy! www.distributed.net Team #1828
    > >
    > > Windows: "Where do you want to go today?"
    > > Linux: "Where do you want to go tomorrow?"
    > > FreeBSD: "Are you guys coming, or what?"
    > > _______________________________________________
    > > freebsd-performance@freebsd.org mailing list
    > > http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    > > To unsubscribe, send any mail to
    > > "freebsd-performance-unsubscribe@freebsd.org"
    > >
    > >
    > >
    > > _______________________________________________
    > > freebsd-performance@freebsd.org mailing list
    > > http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    > > To unsubscribe, send any mail to
    > "freebsd-performance-unsubscribe@freebsd.org"
    > >
    >
    > --
    > Jim C. Nasby, Database Consultant jim@nasby.net
    > Member: Triangle Fraternity, Sports Car Club of America
    > Give your computer some brain candy! www.distributed.net Team #1828
    >
    > Windows: "Where do you want to go today?"
    > Linux: "Where do you want to go tomorrow?"
    > FreeBSD: "Are you guys coming, or what?"
    >
    >
    >

    -- 
    Jim C. Nasby, Database Consultant                  jim@nasby.net
    Member: Triangle Fraternity, Sports Car Club of America
    Give your computer some brain candy! www.distributed.net Team #1828
    Windows: "Where do you want to go today?"
    Linux: "Where do you want to go tomorrow?"
    FreeBSD: "Are you guys coming, or what?"
    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
    

  • Next message: Steven Hartland: "Re: etherchannel on 5.2.1 - possible?"

    Relevant Pages

    • Re: command piped into bzip not using all available CPU
      ... command piped into bzip not using all available CPU ... It's not disk bound, both systat and gstat report less ... To unsubscribe, ...
      (freebsd-performance)
    • command piped into bzip not using all available CPU
      ... a command piped into bzip2 is only effectively ... It's not disk bound, both systat and gstat report less ... PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND ...
      (freebsd-performance)
    • Re: command piped into bzip not using all available CPU
      ... > Why would I expect to see it only use one CPU? ... It was CPU bound, not ... > disk bound. ... There were two CPU-intensive processes running, ...
      (freebsd-performance)
    • Re: CPU Speed
      ... You might try to look at a better CPU like K6-II/450, K6-III or somesuch. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... no trouble from matter or antimatter -- for they had a ...
      (Debian-User)
    • Re: Which 64 bit cpu assembler to use ?
      ... I really hope I can program in machine code, then I don't need any assembler ... much more improvement for gas, just some non-important syntax change, ... Intimate knowledge of your CPU reminds you lets you debug your code ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)