From owner-freebsd-performance@FreeBSD.ORG Mon Oct 25 01:01:13 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 352F816A4CE for ; Mon, 25 Oct 2004 01:01:13 +0000 (GMT) Received: from note.orchestra.cse.unsw.EDU.AU (note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id A381B43D3F for ; Mon, 25 Oct 2004 01:01:12 +0000 (GMT) (envelope-from lukem@cse.unsw.edu.au) Received: From wagner With LocalMail ; Mon, 25 Oct 2004 11:01:09 +1000 From: lukem.freebsd@cse.unsw.edu.au Sender: lukem@cse.unsw.edu.au To: Sean Chittenden Date: Mon, 25 Oct 2004 11:01:09 +1000 (EST) In-Reply-To: <1F92711A-238A-11D9-9171-000A95C705DC@chittenden.org> Message-ID: References: <1F92711A-238A-11D9-9171-000A95C705DC@chittenden.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-performance@freebsd.org Subject: Re: CPU utilisation cap? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 01:01:13 -0000 On Thu, 21 Oct 2004, Sean Chittenden wrote: > There are two things that come to mind. The first being a patch that should > have been applied in time for 5.2, but I forget the timing of the releases. > > http://lists.freebsd.org/mailman/htdig/cvs-src/2003-October/012628.html > > IIRC, there was another commit that made a similar change specifically in the > handling of UDP packets, such that it used a TAILQ append instead of > traversing a linked list. For some reason I think this happened after 5.2, > but I'm not able to find high nor low of the commit and could be pulling said > memory into existence. Too many commits to keep track of. While this would reduce CPU utilisation at a given throughput, it doesn't account for the 20% of CPU time that is available but never used. -- Luke From owner-freebsd-performance@FreeBSD.ORG Mon Oct 25 09:04:39 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B15916A4CE for ; Mon, 25 Oct 2004 09:04:39 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 822A243D58 for ; Mon, 25 Oct 2004 09:04:38 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i9P946ZN001182; Mon, 25 Oct 2004 05:04:06 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i9P946FE001179; Mon, 25 Oct 2004 10:04:06 +0100 (BST) (envelope-from robert@fledge.watson.org) Date: Mon, 25 Oct 2004 10:04:06 +0100 (BST) From: Robert Watson X-Sender: robert@fledge.watson.org To: lukem.freebsd@cse.unsw.edu.au In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-performance@freebsd.org Subject: Re: CPU utilisation cap? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 09:04:39 -0000 On Thu, 21 Oct 2004 lukem.freebsd@cse.unsw.edu.au wrote: > I am measuring idle time using a CPU soaker process which runs at a very > low priority. Top seems to confirm the output it gives. > > What I see is strange. CPU utilisation always peaks (and stays) at > between 80 & 85%. If I increase the amount of work done by the UDP echo > program (by inserting additional packet copies), CPU utilisation does > not rise, but rather, throughput declines. The 80% figure is common to > both the slow and fast PCI cards as well. > > This is rather confusing, as I cannot tell if the system is IO bound or > CPU bound. Certainly I would not have expected the 133/64 PCI bus to be > saturated given that peak throughput is around 550Mbit/s with 1024-byte > packets. (Such a low figure is not unexpected given there are 2 syscalls > per packet). A couple of thoughts, none of which points at any particular red flag, but worth thinking about: - You indicate their are multiple if_em cards in the host -- can you describe the network topology? Are you using multiple cards, or just one of the nicely equipped ones? Is there a switch involved, or direct back-to-back wires? - Are the packet sources generating the packets synchronously or asynchronously: i.e., when a packet source sends a UDP packet, does it wait for the response before continuing, or keep on sending? If synchronously, are you sure that the wires are being kept busy? - Make sure your math on PCI bus bandwidth accounts for packets going in both directions if you're actually echoing the packets. Also make sure to include the size of the ethernet frame and any other headers. - If you're using SCHED_ULE, be aware that it's notion of "nice" is a little different from the traditional UNIX notion, and attempts to provide more proportional CPU allocation. You might try switching to SCHED_4BSD. Note that there have been pretty large scheduler changes in 5.3, with a number of the features that were previously specific to SCHED_ULE being made available with SCHED_4BSD, and that a lot of scheduling bugs have been fixed. If you move to 5.3, make sure you run with 4BSD, and it would be worth trying it with 5.2 to "see what happens". - It would be worth trying the test without the soaker process but instead a sampling process that polls the kernel's notion of CPU% measurement every second. That way if it does turn out that ULE is unecessarily giving CPU cycles to the soaker, you can still measure w/o "soaking". - What does your soaker do -- in particular, does it make system calls to determine the time frequently? If so, the synchronization operations and scheduling cost associated with that may impact your measurements. If it just spins reading the tsc and outputting once in a while, you should be OK WRT this point. - Could you confirm using netstat -s statistics that a lot of your packets aren't getting dropped due to full buffers on either send or receive. Also, do you have any tests in place to measure packet loss? Can you confirm that all the packets you send from the Linux boxes are really sent, and that given they are sent, that they arrive, and vice versa on the echo? Adding sequence numbers and measuring the mean sequence number difference might be an easy way to start if you aren't already. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research From owner-freebsd-performance@FreeBSD.ORG Mon Oct 25 13:56:04 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E105916A4CE; Mon, 25 Oct 2004 13:56:03 +0000 (GMT) Received: from note.orchestra.cse.unsw.EDU.AU (note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5CE743D2D; Mon, 25 Oct 2004 13:56:02 +0000 (GMT) (envelope-from lukem@cse.unsw.edu.au) Received: From wagner With LocalMail ; Mon, 25 Oct 2004 23:55:59 +1000 From: lukem.freebsd@cse.unsw.edu.au Sender: lukem@cse.unsw.edu.au To: Robert Watson Date: Mon, 25 Oct 2004 23:55:59 +1000 (EST) In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-performance@freebsd.org Subject: Re: CPU utilisation cap? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 13:56:04 -0000 On Mon, 25 Oct 2004, Robert Watson wrote: > A couple of thoughts, none of which points at any particular red flag, but > worth thinking about: > > - You indicate their are multiple if_em cards in the host -- can you > describe the network topology? Are you using multiple cards, or just > one of the nicely equipped ones? Is there a switch involved, or direct > back-to-back wires? I have 4 linux boxes (don't blame me!) generating udp traffic through an 8-port HP procurve gigabit switch. The software I am using is ipbench (see ipbench.sourceforge.net for details). I am presently only using one NIC at a time, though I intend to measure routing performance soon which will eliminate the user component (and hopefully some possible scheduler effects), and might shed more light on things. > - Are the packet sources generating the packets synchronously or > asynchronously: i.e., when a packet source sends a UDP packet, does it > wait for the response before continuing, or keep on sending? If > synchronously, are you sure that the wires are being kept busy? It is not a ping-pong benchmark. The traffic is generated continuously, each packet is timestamped as it is sent, and the timestamp is compared with the receipt time to get a round trip time (I didn't bother including the latency information in my pust to freebsd-net). > - Make sure your math on PCI bus bandwidth accounts for packets going in > both directions if you're actually echoing the packets. Also make sure > to include the size of the ethernet frame and any other headers. The values I have quoted (550Mbit etc.) are throughput for what is received at the linux box after echoing. Therefore we can expect double that on the PCI bus, plus overheads. > - If you're using SCHED_ULE, be aware that it's notion of "nice" is a > little different from the traditional UNIX notion, and attempts to > provide more proportional CPU allocation. You might try switching to > SCHED_4BSD. Note that there have been pretty large scheduler changes in > 5.3, with a number of the features that were previously specific to > SCHED_ULE being made available with SCHED_4BSD, and that a lot of > scheduling bugs have been fixed. If you move to 5.3, make sure you run > with 4BSD, and it would be worth trying it with 5.2 to "see what > happens". I very strongly agree that it sounds like a scheduling effect. The 5.2.1 kernel (which is what I am using) is built with SCHED_4BSD already. It will be interesting to see if the new scheduler makes a difference. > - It would be worth trying the test without the soaker process but instead > a sampling process that polls the kernel's notion of CPU% measurement > every second. That way if it does turn out that ULE is unecessarily > giving CPU cycles to the soaker, you can still measure w/o "soaking". > > - What does your soaker do -- in particular, does it make system calls to > determine the time frequently? If so, the synchronization operations > and scheduling cost associated with that may impact your measurements. > If it just spins reading the tsc and outputting once in a while, you > should be OK WRT this point. I will look into this. I didn't write the code so I'm not sure what it does exactly. From what I understand it uses a calibrated tight loop, so it shouldn't need to do any syscalls while it is running, but I will check it out anyway. I have been considering implementing this using a cycle count register, but have avoided it for portability so far. > - Could you confirm using netstat -s statistics that a lot of your packets > aren't getting dropped due to full buffers on either send or receive. > Also, do you have any tests in place to measure packet loss? Can you > confirm that all the packets you send from the Linux boxes are really > sent, and that given they are sent, that they arrive, and vice versa on > the echo? Adding sequence numbers and measuring the mean sequence > number difference might be an easy way to start if you aren't already. I get numbers for both the packets transmitted and the packets received (albeit in terms of throughputs). What I see is little-to-no packet loss below the MLFRR (maximum loss free receive rate), and obviously packets get lost after that. Thanks for the help! -- Luke From owner-freebsd-performance@FreeBSD.ORG Tue Oct 26 02:09:13 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11AED16A4CE for ; Tue, 26 Oct 2004 02:09:13 +0000 (GMT) Received: from aeimail.aei.ca (mail.aei.ca [206.123.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 503AB43D45 for ; Tue, 26 Oct 2004 02:09:12 +0000 (GMT) (envelope-from premi@altern.org) Received: from [10.0.0.1] (dsl-131-80.aei.ca [66.36.131.80]) by aeimail.aei.ca (8.12.10/8.12.10) with ESMTP id i9Q297LA024425 for ; Mon, 25 Oct 2004 22:09:11 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-performance@freebsd.org From: "R. Payette" Date: Mon, 25 Oct 2004 22:09:05 -0400 X-Mailer: Apple Mail (2.619) X-Mailman-Approved-At: Tue, 26 Oct 2004 12:55:45 +0000 Subject: Disk buffer / memory utilization X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2004 02:09:13 -0000 I'm trying to get the best performances from a ratter limited system. My question is 2 fold : 1- the 'buf' column in top, I thought freebsd ( and other modern OSes ) used free memory for disk buffer until it is required for something else. But I see on my system that the 'buf' is always 14 M no matter the load on the server, even in heavy swapping situations, it remains 14 M. 2- how to reduce the wired memory ? I have a lean custom built kernel and 17M ( around 22M after a few hour of utilization ) is a little to much to be normal. I mean, out of the 64M this machine has, 36M are locked out by the bare system which has, a network card, a hard disk and an unused video card ( headless machine ). Is there something I can tune in sysctl or my kernel conf ? or is it a concept I don't get correctly ? Thanks for any help, pointers From owner-freebsd-performance@FreeBSD.ORG Tue Oct 26 13:45:32 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3116B16A4CE for ; Tue, 26 Oct 2004 13:45:32 +0000 (GMT) Received: from otter3.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACB2143D3F for ; Tue, 26 Oct 2004 13:45:31 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by otter3.centtech.com (8.12.3/8.12.3) with ESMTP id i9QDjS6u096214; Tue, 26 Oct 2004 08:45:29 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <417E54E9.7030401@centtech.com> Date: Tue, 26 Oct 2004 08:45:13 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041025 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "R. Payette" References: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> In-Reply-To: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-performance@freebsd.org Subject: Re: Disk buffer / memory utilization X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2004 13:45:32 -0000 R. Payette wrote: > I'm trying to get the best performances from a ratter limited system. My > question is 2 fold : > > 1- the 'buf' column in top, I thought freebsd ( and other modern OSes ) > used free memory for disk buffer until it is required for something > else. But I see on my system that the 'buf' is always 14 M no matter the > load on the server, even in heavy swapping situations, it remains 14 M. > > 2- how to reduce the wired memory ? I have a lean custom built kernel > and 17M ( around 22M after a few hour of utilization ) is a little to > much to be normal. I mean, out of the 64M this machine has, 36M are > locked out by the bare system which has, a network card, a hard disk and > an unused video card ( headless machine ). > > Is there something I can tune in sysctl or my kernel conf ? or is it a > concept I don't get correctly ? I would strongly suggest reading the 'tuning' man page - it's really pretty good, and should answer some of your questions (maybe not specifically, but indirectly about tuning some sysctl's and such). Which such a small amount of memory, you're going to have to work harder at getting it just right. You should also mention what you are trying to make perform well on this system, what version of FreeBSD, and maybe also the hardware information. Eric -- ------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Talk sense to a fool and he calls you foolish. ------------------------------------------------------------------ From owner-freebsd-performance@FreeBSD.ORG Thu Oct 28 07:49:15 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62AF416A4F8 for ; Thu, 28 Oct 2004 07:49:15 +0000 (GMT) Received: from istanbul.enderunix.org (freefall.marmara.edu.tr [193.140.143.23]) by mx1.FreeBSD.org (Postfix) with SMTP id D07C543D2F for ; Thu, 28 Oct 2004 07:49:11 +0000 (GMT) (envelope-from ofsen@enderunix.org) Received: (qmail 77920 invoked by uid 89); 28 Oct 2004 07:49:29 -0000 Message-ID: <20041028074929.77915.qmail@istanbul.enderunix.org> From: Omer Faruk Sen To: freebsd-performance@freebsd.org Date: Thu, 28 Oct 2004 10:49:29 +0300 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-9" Content-Transfer-Encoding: 7bit Subject: Mysql high cpu usage problem X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 07:49:15 -0000 Hi, I have a system with apache+php+mysql. The system was fine for a long time but my problem started a few weeks ago. I have two 2.8 Ghz Xeon CPU's. Hyperthreading is enabled. 2 gigs of RAM. machdep.hlt_logical_cpus=0 and polling is enabled. Mysql (which was compiled with linux_threads and staticly linked libraries) has started to consume lots of cpu time (mainly system and nice times) Here's a moment from top output: last pid: 60888; load averages: 114.70, 114.42, 115.72 up 2+01:10:28 10:44:18 3 processes: 2 running, 1 sleeping CPU states: 1.7% user, 52.3% nice, 44.9% system, 1.1% interrupt, 0.0% idle Mem: 494M Active, 1034M Inact, 357M Wired, 97M Cache, 199M Buf, 21M Free Swap: 3072M Total, 104K Used, 3072M Free What's worth attention here is that, cpu spends nearly all of its time in kernel mode. Number of hits, the web server gets did not change much, maybe a little rise. Can you please provide some info tracking down the problem? ----------------------- Omer Faruk Sen http://www.EnderUNIX.ORG Software Development Team @ Turkey http://www.Faruk.NET For Public key: http://www.enderunix.org/ofsen/ofsen.asc ******************************************************** First Turkish FreeBSD book is out! Go check it. Duydunuz mu! Turkiye'nin ilk FreeBSD kitabi cikti. http://www.acikkod.com/freebsd.php From owner-freebsd-performance@FreeBSD.ORG Thu Oct 28 16:09:21 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C1AF16A4CE for ; Thu, 28 Oct 2004 16:09:21 +0000 (GMT) Received: from otter3.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81FAF43D2F for ; Thu, 28 Oct 2004 16:09:20 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by otter3.centtech.com (8.12.3/8.12.3) with ESMTP id i9SG9H6u005429; Thu, 28 Oct 2004 11:09:17 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <418119AA.6050608@centtech.com> Date: Thu, 28 Oct 2004 11:09:14 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041025 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Omer Faruk Sen References: <20041028074929.77915.qmail@istanbul.enderunix.org> In-Reply-To: <20041028074929.77915.qmail@istanbul.enderunix.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-performance@freebsd.org Subject: Re: Mysql high cpu usage problem X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 16:09:21 -0000 Omer Faruk Sen wrote: > Hi, > I have a system with apache+php+mysql. The system was fine for a long > time but my problem started a few weeks ago. > I have two 2.8 Ghz Xeon CPU's. Hyperthreading is enabled. 2 gigs of RAM. > machdep.hlt_logical_cpus=0 and polling is enabled. > Mysql (which was compiled with linux_threads and staticly linked > libraries) has started to consume lots of cpu time (mainly system and > nice times) > Here's a moment from top output: > last pid: 60888; load averages: 114.70, 114.42, > 115.72 up 2+01:10:28 10:44:18 > 3 processes: 2 running, 1 sleeping > CPU states: 1.7% user, 52.3% nice, 44.9% system, 1.1% interrupt, 0.0% > idle > Mem: 494M Active, 1034M Inact, 357M Wired, 97M Cache, 199M Buf, 21M Free > Swap: 3072M Total, 104K Used, 3072M Free > What's worth attention here is that, cpu spends nearly all of its time > in kernel mode. > Number of hits, the web server gets did not change much, maybe a little > rise. > Can you please provide some info tracking down the problem? Have you optimized your tables/indexes recently? Also - do you have a large number of outstanding connections to the db? Eric -- ------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Talk sense to a fool and he calls you foolish. ------------------------------------------------------------------ From owner-freebsd-performance@FreeBSD.ORG Sat Oct 30 16:11:42 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D07616A4CE for ; Sat, 30 Oct 2004 16:11:42 +0000 (GMT) Received: from otter3.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 012B243D49 for ; Sat, 30 Oct 2004 16:11:42 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] ([192.168.42.24]) by otter3.centtech.com (8.12.3/8.12.3) with ESMTP id i9UGBd6u057422; Sat, 30 Oct 2004 11:11:39 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4183BD37.5090007@centtech.com> Date: Sat, 30 Oct 2004 11:11:35 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041025 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "R. Payette" References: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> <417E54E9.7030401@centtech.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-performance@freebsd.org Subject: Re: Disk buffer / memory utilization X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 16:11:42 -0000 R. Payette wrote: > I've read and tried the tuning man page ( i've gained 2-3 M on the wired ). > > This is typical top output during a build process. It's running awfully > slow because the system spend most of it's time swapping, while there > still is that 14M Buf. I'm not sure you'll really get rid of the 14M Buffers, but you might be able to reduce them - what does: sysctl kern.maxusers report? Is this box solely for compiling? Or is it an NFS server, or web server, etc? > What happened with 16-32M ram unix servers ? what's so big in modern > unix that make it unusable on low-end hardware ? How do you build > kernels that fit on a floppy ( mine is 3.3 M and I thought I removed > everything that could be removed from the kernel config file ) From what I see, there is probably still some stuff that can be removed. Do you need eisa support? NFS? MSDOSFS? IPV6? > freebsd 5.3rc1 > p2 350 > de ethernet card ( generic dec 21041 card ) > ide 4.3G hd > 64M ram > kernel config : http://massonerie.kicks-ass.org/kc Can you send (or post on the net somewhere) the output of: ps -auxw Right after the machine boots cleanly? Eric -- ------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Talk sense to a fool and he calls you foolish. ------------------------------------------------------------------ From owner-freebsd-performance@FreeBSD.ORG Sat Oct 30 15:18:41 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F25BB16A4CE for ; Sat, 30 Oct 2004 15:18:41 +0000 (GMT) Received: from aeimail.aei.ca (mail.aei.ca [206.123.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CB9C43D49 for ; Sat, 30 Oct 2004 15:18:41 +0000 (GMT) (envelope-from premi@altern.org) Received: from [10.0.0.1] (dsl-133-171.aei.ca [66.36.133.171]) by aeimail.aei.ca (8.12.10/8.12.10) with ESMTP id i9UFIRwB004062; Sat, 30 Oct 2004 11:18:28 -0400 (EDT) In-Reply-To: <417E54E9.7030401@centtech.com> References: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> <417E54E9.7030401@centtech.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: "R. Payette" Date: Sat, 30 Oct 2004 11:18:24 -0400 To: Eric Anderson X-Mailer: Apple Mail (2.619) X-Mailman-Approved-At: Sat, 30 Oct 2004 19:26:35 +0000 cc: freebsd-performance@freebsd.org Subject: Re: Disk buffer / memory utilization X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 15:18:42 -0000 I've read and tried the tuning man page ( i've gained 2-3 M on the wired ). This is typical top output during a build process. It's running awfully slow because the system spend most of it's time swapping, while there still is that 14M Buf. CPU states: 4.7% user, 0.0% nice, 13.6% system, 1.9% interrupt, 79.8% idle Mem: 29M Active, 5696K Inact, 20M Wired, 3208K Cache, 14M Buf, 404K Free Swap: 128M Total, 68M Used, 59M Free, 53% Inuse, 4184K In, 2448K Out PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 10282 root -20 0 74700K 27336K swread 0:21 21.42% 20.41% cc1plus 193 root 96 0 4284K 1536K select 108:52 0.98% 0.98% ppp What happened with 16-32M ram unix servers ? what's so big in modern unix that make it unusable on low-end hardware ? How do you build kernels that fit on a floppy ( mine is 3.3 M and I thought I removed everything that could be removed from the kernel config file ) freebsd 5.3rc1 p2 350 de ethernet card ( generic dec 21041 card ) ide 4.3G hd 64M ram kernel config : http://massonerie.kicks-ass.org/kc Sorry if it's kind of a newbie question. I feel that I'm overlooking something big not just finetuning thanks for any help > > I would strongly suggest reading the 'tuning' man page - it's really > pretty good, and should answer some of your questions (maybe not > specifically, but indirectly about tuning some sysctl's and such). > > Which such a small amount of memory, you're going to have to work > harder at getting it just right. > > You should also mention what you are trying to make perform well on > this system, what version of FreeBSD, and maybe also the hardware > information. > > Eric > > > > -- > ------------------------------------------------------------------ > Eric Anderson Sr. Systems Administrator Centaur Technology > Talk sense to a fool and he calls you foolish. > ------------------------------------------------------------------ > From owner-freebsd-performance@FreeBSD.ORG Sat Oct 30 21:31:25 2004 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B9F816A4CE for ; Sat, 30 Oct 2004 21:31:25 +0000 (GMT) Received: from aeimail.aei.ca (mail.aei.ca [206.123.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D19043D2F for ; Sat, 30 Oct 2004 21:31:24 +0000 (GMT) (envelope-from premi@altern.org) Received: from [10.0.0.1] (dsl-150-31.aei.ca [66.36.150.31]) by aeimail.aei.ca (8.12.10/8.12.10) with ESMTP id i9ULVG77016417; Sat, 30 Oct 2004 17:31:17 -0400 (EDT) In-Reply-To: <4183BD37.5090007@centtech.com> References: <0327434A-26F4-11D9-A907-0030658DC702@altern.org> <417E54E9.7030401@centtech.com> <4183BD37.5090007@centtech.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <071D7376-2ABB-11D9-90C5-0030658DC702@altern.org> Content-Transfer-Encoding: 7bit From: "R. Payette" Date: Sat, 30 Oct 2004 17:31:15 -0400 To: Eric Anderson X-Mailer: Apple Mail (2.619) cc: freebsd-performance@freebsd.org Subject: Re: Disk buffer / memory utilization X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 21:31:25 -0000 > > I'm not sure you'll really get rid of the 14M Buffers, but you might > be able to reduce them - what does: > sysctl kern.maxusers > report? > > Is this box solely for compiling? Or is it an NFS server, or web > server, etc? > used to be 32, after reading tuning, I reduced it to 16. No, if not mainly for compiling, I build world, kernel and ports on it. It's main usage is a nat router for our dsl connexion, and a webserver with mysql for a small web site ( 10 visit / day maximum ). > From what I see, there is probably still some stuff that can be > removed. Do you need eisa support? NFS? MSDOSFS? IPV6? > I just removed eisa, msdosfs and ipv6 but I need nfs. After recompile and reboot, I gained a little bit and here is the ps -auxw http://massonerie.kicks-ass.org/psauxw also, the 12th line of dmesg says : http://massonerie.kicks-ass.org/dmesg ACPI disabled by blacklist. Contact your BIOS vendor. but kldstat says acpi.ko is loaded. Is it safe to disable it ? Thanks again for your time