Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161425AbXECVZv (ORCPT ); Thu, 3 May 2007 17:25:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161485AbXECVZv (ORCPT ); Thu, 3 May 2007 17:25:51 -0400 Received: from dsl081-033-126.lax1.dsl.speakeasy.net ([64.81.33.126]:57110 "EHLO bifrost.lang.hm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161425AbXECVZu (ORCPT ); Thu, 3 May 2007 17:25:50 -0400 Date: Thu, 3 May 2007 14:25:02 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard.lang.hm To: David Schwartz cc: linux-kernel@vger.kernel.org Subject: RE: scheduling oddity on 2.6.20.3 stock In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 34 On Thu, 3 May 2007, David Schwartz wrote: >> I needed to recompress some files from .bz2 to .gz so I setup a script to >> do >> >> bunzip2 -c $file.bz2 |gzip -9 >$file.gz >> >> I expected that the two CPU heavy processes would end up on different >> cpu's and spend a little time shuffling data between the two cpu's on a >> system (dual core opteron) >> >> however, instead what I find is that each process is getting 50% of one >> cpu while the other cpu is 97% idle. > > That would only be possible if the compression/decompression block size is > small compared to the maximum pipe buffer size. I suspect the reverse is the > case. > > It would be interesting to write an intermediate process that basically > enlarged the pipe buffers and see if that changed anything. Basically, the > intermediate process would allocate a large buffer (16MB or so) and fill it > from 'bunzip2' while draining it to 'gzip' in a non-blocking way (unless the > buffer was full/empty, of course). hmm, how about bunzip2 -c $file.bz2 |dd bs=8m |gzip -9 >$file.gz should that work? David Lang - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/