Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 11 Jan 2002 10:30:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 11 Jan 2002 10:30:38 -0500 Received: from CPE0000d400a7cc.cpe.net.cable.rogers.com ([24.156.80.5]:37104 "HELO bits.dyndns.org") by vger.kernel.org with SMTP id convert rfc822-to-8bit; Fri, 11 Jan 2002 10:30:35 -0500 Date: 11 Jan 2002 15:30:34 -0000 Message-ID: <20020111153034.11168.qmail@bits.dyndns.org> Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7BIT Mime-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Subject: Re: Where's all my memory going? To: matt@bodgit-n-scarper.com From: Rolf Lear Cc: linux-kernel@vger.kernel.org In-Reply-To: %3C20020109173633.A26559%40mould.bodgit-n-scarper.com%3E%20from%20Matt%0A%20%20%20%20Dainty%20on%20Wed%2C%209%20Jan%202002%2017%3A36%3A33%20%2B0000%0A Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Matt Dainty writes: >Hi, > >I've fashioned a qmail mail server using an HP NetServer with an HP NetRaid >4M & 1GB RAM, running 2.4.17 with aacraid, LVM, ext3 and highmem. The box >has 6x 9GB disks, one for system, one for qmail's queue, and the remaining >four are RAID5'd with LVM. ext3 is only on the queue disk, ext2 everywhere >else. > .... qmail is very file intensive (which is a good thing ...), and RAID5 is very resource intensive (every write to RAID5 involves a number of reads and a write). It is quite conceivable that the data volume (throughput) generated by the tests is too large for the throughput of your RAID system. From your mail I understand that the mails are being delivered locally to the RAID5 disk array. One explaination for your results are that your qmail queue is being filled (by qmail-smtpd) at the rate of the network (presumably 100Mbit or about 10-12MiB/s). This queue is then delivered locally to the RAID5. Files in the queue do not last long (are created and then deleted, and the cache probably never gets flushed to disk ...). Delivered e-mails fill the cache though, and the kernel at some point will begin flushing these cache entries to disk. At some point (and I am guessing this is your 35-40 minute point) all pages in the cache are dirty (i.e. the kernel has not been able to write the cache to disk as fast as it is being filled ...). This will cause the disk to become your bottleneck. This is based on the assumption that the RAID5 is slower than the network. In my experience, this is often the case. A good test for this would be tools like bonnie++, or tools like vmstat. On a saturated raid array with a cache, it is typical to get 'vmstat 1' output which shows rapid bursts of data writes (bo's), followed by periods of inactivity. A longer vmstat like 'vmstat 10' will probably even out these bursts, and show an 'averaged' throughput of your disks. It is possible that I am completely off base, but I have been battling similar problems myself recently, and discovered to my horror that RAID5 disk arrays are pathetically slow. Check your disk performance for the bottleneck. Rolf - 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/