From owner-freebsd-questions@FreeBSD.ORG Thu Apr 6 14:11:46 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5973316A420 for ; Thu, 6 Apr 2006 14:11:46 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D71343D73 for ; Thu, 6 Apr 2006 14:11:17 +0000 (GMT) (envelope-from usleepless@gmail.com) Received: by zproxy.gmail.com with SMTP id l8so138225nzf for ; Thu, 06 Apr 2006 07:11:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k+5q+PKTK3zD9+85fh9rz4UzVlb6p3+w3qwTpoPt+y9BmmaVVpTJp0nbIfAVgkb3HSer6LHJjuQAxAvwMEPhdcOSEr8lgHkTH1txOIfKpA+BaOvb8hkglM/kFgDOhoR81ARDDBMA0bs0wl7BxlqkxTMk7TYZCHLB1pg16zKaga4= Received: by 10.37.12.23 with SMTP id p23mr1111212nzi; Thu, 06 Apr 2006 07:11:16 -0700 (PDT) Received: by 10.36.153.5 with HTTP; Thu, 6 Apr 2006 07:11:16 -0700 (PDT) Message-ID: Date: Thu, 6 Apr 2006 16:11:16 +0200 From: usleepless@gmail.com To: "Bill Moran" In-Reply-To: <20060406100059.18767788.wmoran@collaborativefusion.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42a5f58c0604060143g5e68e806r870761a1beeefbb5@mail.gmail.com> <20060406100059.18767788.wmoran@collaborativefusion.com> Cc: Karl Ma , freebsd-questions@freebsd.org Subject: Re: Giving more CPU time to a swapping process? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2006 14:11:46 -0000 Hello, i am just wondering myself: this has nothing to with "copy on write"? or does that not exist on neither platform? regards, usleep On 4/6/06, Bill Moran wrote: > "Karl Ma" wrote: > > Hi, > > > > I have a python program in freebsd, doing a heavey indexing job involvi= ng > a > > mega size array. > > > > The process is so memory-hungry that it starts swap after the physical = RAM > > max out. (To be exact, I've lowered the per-process limitation to make > this > > possible). > > Why would you do this? I dare you to lower the per-process limitation on > Window XP and see how the run times compare. If you lower the amount of > resources, of course the process will perform badly. > > Any time a process has to swap, performance will suffer _greatly_. Eithe= r > invest in more RAM or optimize the process to be more RAM efficient. > > > However, when I use top to monitor the status, the STATE of the process > > started to stay as "swread" for most of the time (instead of RUN before > > using swap) and its priority has dropped to -20; and the corresponding > WCPU > > drops to around 1% only. And the CPU consumption time in total (for the > > whole job) would only increase a minute or two even the process has bee= n > > running for more than a few hours. > > Yes. That is the system automatically doing what you are asking how to > do. Since the process is spending so much time waiting for data to > swap in/out, the kernel lowers the priority (lower priority # on Unix > systems means the process has a higher priority) so the process will > be the first into the run queue when it has it's data. However, it > can't run when it doesn't have the data it needs, and swapping takes > time. > > > In Windows XP, which has less per-task resource restriction (I guess?),= I > > did successfully complete the task on the same hardware machine; althou= gh > it > > takes more than 30 mins. > > Did you lower the per-process limit on XP to match what you did on FreeBS= D? > If not, then why are you trying to compare apples to elephants? > > > How can I push up the priority of the whole paging task? > > If you want to change the priority of the paging task, you'll need to > hack the kernel. > > > How can I > > allocate more CPU attention to this process? I've tried using "nice" > > but it does not help. > > nice is the correct command to allocate more CPU attention to the process= . > However, the process can't use the CPU if it doesn't have it's data in > memory. > > -- > Bill Moran > Potential Technologies > http://www.potentialtech.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >