Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 6099 invoked from network); 27 Aug 2008 22:13:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2008 22:13:21 -0000 Received: (qmail 83197 invoked by uid 500); 27 Aug 2008 22:13:09 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 83180 invoked by uid 500); 27 Aug 2008 22:13:09 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 83169 invoked by uid 99); 27 Aug 2008 22:13:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2008 15:13:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.191.85.72] (HELO web36904.mail.mud.yahoo.com) (209.191.85.72) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 27 Aug 2008 22:12:11 +0000 Received: (qmail 34575 invoked by uid 60001); 27 Aug 2008 22:12:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=0RKAdiGfGeECsVcOUz4dNjuoxbBNRIwez3hds8FfFlTQ01XOVBk2BugCADa9MaHZB39xPi3kL6AD9go7BjHU/bb/XIAhceHImq82eHBs2zq7/VqXIXXtOsHMxuq1nIlzoizmFm4ogmY8cn8r+MaZpndvK+y4aCg6WUNi7xcyp0c=; X-YMail-OSG: U.NiZUkVM1lTRpK7AN_zhSaXPu7eoGUtBiAfcDK2RqP9YdGZGglHdg81UPjVS9j6Mg-- Received: from [198.147.192.8] by web36904.mail.mud.yahoo.com via HTTP; Wed, 27 Aug 2008 15:12:38 PDT X-Mailer: YahooMailRC/1042.48 YahooMailWebService/0.7.218.2 Date: Wed, 27 Aug 2008 15:12:38 -0700 (PDT) From: Richard de Vries To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <314867.34453.qm@web36904.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] lower cpu priority to perl scripts If you are running on unix, the easiest way to probably do this is by calli= ng the "setpriority" from within your perl script like this:=0Asetpriority(= WHICH,WHO,PRIORITY);=0ATo set your current running perlscript to the lowest= priority, you would call setpriority(0, $$, 20);=0A$$ is your script's pro= cess ID, and "20" denotes the priority. (as you know, -20 is highest priori= ty and 20 the lowest priority). =0ACheers,=0A=A0=A0 R.=0A=0A----- Original = Message ----=0AFrom: Audio Phile =0ATo: users@http= d.apache.org=0ASent: Wednesday, August 27, 2008 2:18:53 PM=0ASubject: Re: [= users@httpd] lower cpu priority to perl scripts=0A=0ATamer,=0A=0AThank you = very much for the reply.=A0 I googled around for the proper syntax of your = suggestion as well as which config file I need to edit with it, but I came = up with a big fat 0.=A0 Can you provide a few more details for me?=A0 Apolo= gies in advance, I am a newbie with apache2 :)=0A=0ATamer Embaby wrote: =0A= Audio,=0A=0AYou can always start your scripts with [re]nice() syscall to lo= wer=0Ayour process (perl script in this case) priority.=0A=0ARegards,=0ATam= er=0A=0A-----Original Message-----=0AFrom: Audio Phile [mailto:da_audiophil= e@yahoo.com]=0ASent: Tuesday, August 26, 2008 8:57 PM=0ATo: users@httpd.apa= che.org=0ASubject: [users@httpd] lower cpu priority to perl scripts=0A=0AI'= d like to adjust the priority of /usr/bin/perl such that it will always run= with very low priority.=A0 The PC that I'm using isn't very powerful.=A0 I= 'm running rrdweather on it and when a user hits the weather.cgi about 10 p= rocesses of perl scripts run,=0Awhich totally throttles foreground applicat= ions until they finish.=0A=0AHow can I assign /usr/bin/perl to always run w= ith a really low CPU priority (a really high nice value) for any script it = executes? Is this an apache2 setting or...?=0A=0A=0A=A0 =A0 =A0 =0A=0A-----= ----------------------------------------------------------------=0AThe offi= cial User-To-User support forum of the Apache HTTP Server Project.=0ASee for more info.=0ATo unsubscribe,= e-mail: users-unsubscribe@httpd.apache.org=0A=A0 "=A0 from the digest: use= rs-digest-unsubscribe@httpd.apache.org=0AFor additional commands, e-mail: u= sers-help@httpd.apache.org=0A=0A=0A --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org