From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QrPoi-0007Dw-KF for garchives@archives.gentoo.org; Thu, 11 Aug 2011 07:36:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A517C21C356; Thu, 11 Aug 2011 07:36:27 +0000 (UTC) Received: from svr-us4.tirtonadi.com (unknown [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id C315C21C2DA for ; Thu, 11 Aug 2011 07:35:33 +0000 (UTC) Received: from mail-fx0-f53.google.com ([209.85.161.53]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1QrPni-000fcO-FD for gentoo-user@lists.gentoo.org; Thu, 11 Aug 2011 14:35:34 +0700 Received: by fxd23 with SMTP id 23so1931295fxd.40 for ; Thu, 11 Aug 2011 00:35:29 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.223.54.206 with SMTP id r14mr7709199fag.13.1313048129728; Thu, 11 Aug 2011 00:35:29 -0700 (PDT) Received: by 10.223.100.4 with HTTP; Thu, 11 Aug 2011 00:35:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Aug 2011 14:35:29 +0700 Message-ID: Subject: Re: [gentoo-user] Re: Custom Timer Frequency (CONFIG_HZ)? From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: a88477fe436fd23af46f3ea542db94da On Thu, Aug 11, 2011 at 14:27, Nikos Chantziaras wrote: > On 08/11/2011 09:56 AM, Pandu Poluan wrote: >> >> Just wondering, is it possible to specify a custom timer frequency? >> E.g., HZ=3D500 instead of one of the canned values (100, 250, 300, >> 1000). > > It is possible, but it's a bad idea because non-standard values can resul= t > in driver breakage. =C2=A0Some code assumes specific timer granularities = (100Hz =3D > 10ms, 250Hz =3D 4ms, etc). =C2=A0This usually happens with values above 1= 000Hz, so > it might be possible to experiment with non-standard sub-1000Hz values. > > But why do you want a custom value anyway? > Well, for a firewall, I've calculated (gathered and extrapolated from a lot of sources), the latency per-packet is usually less than 1 ms, at worst still less than 2 ms. Thus, setting the timer freq to 100 Hz (as suggested for 'normal' server load) means the timeslice is way too long (10 ms per time slice). So, I speculate that better -- and uniform -- performance will be achieved with a timer freq of 500 Hz. Of course, this is a wild speculation/guess from me. I never quite understand netfilter/xtables' relation to the timeslices, so I may be talking nonsense :-) Rgds, --=20 FdS Pandu E Poluan ~ IT Optimizer ~ =C2=A0=E2=80=A2 Blog : http://pepoluan.tumblr.com =C2=A0=E2=80=A2 Linked-In : http://id.linkedin.com/in/pepoluan