From owner-freebsd-questions@FreeBSD.ORG Thu Jan 25 19:40:14 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D23AA16A402 for ; Thu, 25 Jan 2007 19:40:14 +0000 (UTC) (envelope-from maxsec@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0E09C13C45E for ; Thu, 25 Jan 2007 19:40:13 +0000 (UTC) (envelope-from maxsec@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so502533uge for ; Thu, 25 Jan 2007 11:40:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:subject:cc:in-reply-to:mime-version:content-type:references; b=Awbbx68MqmVSPsOK8jLKfCv2ZHq9kFZI0SIbsk2uSyHdFj8j5kMeOUtpPcK8mhKruMJFgJv6FbvibaoTcHWU0VNb1dufGIYUqcMGu0PBcxIyv1sQpmMunQWF2bXOXuGFCKwZje5XV+yDfrw/4w1VNiqAJ2LzwbSQNdWZ7Akltko= Received: by 10.82.148.7 with SMTP id v7mr1225671bud.1169754012070; Thu, 25 Jan 2007 11:40:12 -0800 (PST) Received: by 10.78.148.10 with HTTP; Thu, 25 Jan 2007 11:40:11 -0800 (PST) Message-ID: <72cf361e0701251140l6c48149eu834252d18bdd9bf5@mail.gmail.com> Date: Thu, 25 Jan 2007 19:40:12 +0000 From: "Martin Hepworth" Cc: freebsd-questions@freebsd.org In-Reply-To: <25E0702D-C3A3-4B6B-BC56-D1BC5C1347F5@cyberlifelabs.com> MIME-Version: 1.0 References: <25E0702D-C3A3-4B6B-BC56-D1BC5C1347F5@cyberlifelabs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: RAID Performance Questions 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, 25 Jan 2007 19:40:14 -0000 Milo if you hunt around you should see papers/articles where it shows foe RAID 5 you need at least 5 drives before you any dramatic performance gains..(sun old Sun articles from around 1998 where they do the math as well). not sure about RAID 10, but again I *think* you need at least 3 drives in the stripe before you start hitting gains. To best test I'd put ALL the SATA drives into the RAID 5 or RAID 10 array and then see what happens. -- Martin On 1/25/07, Milo Hyson wrote: > > I don't really have a whole lot of experience with RAID, so I was > wondering if the performance figures I'm seeing are normal or if I > just need to tweak things a bit. Based on what I've been reading, I > would expect more significant improvements over a single drive. > Here's my setup: > > * FreeBSD 5.4-RELEASE-p22 > * AMD Athlon 2200+ > * 512 MB RAM > * 3ware 9500S-8 RAID controller > * 8 x Maxtor 7Y250M0 drives (SATA150 - 250 GB each) > * 1 x UDMA100 system drive > > I'm using a trimmed-down but otherwise stock kernel (see below). The > array is configured as two units: a three-drive RAID 5 and a four- > drive RAID 10. Both units have been fully initialized and verified. > No errors or warnings are being issued by the controller -- > everything is green. Using bonnie I get the following results with a > 1.5 GB file: > > -------Sequential Output-------- ---Sequential Input-- > --Random-- > -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- > --Seeks--- > Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec % > CPU /sec %CPU > single 1536 42229 45.1 44379 19.4 17227 7.7 40819 41.6 44772 12.1 > 141.1 0.7 > raid5 1536 21812 22.8 21876 8.7 12935 5.9 47283 48.3 61998 17.0 > 152.8 0.8 > raid10 1536 21905 23.0 21999 8.6 14878 6.7 49036 50.1 64847 17.7 > 130.6 0.7 > > The write times of both RAID configurations are slower than the > single drive (which is expected due to having to write to multiple > drives). However, I wasn't expecting such a drastic reduction (about > 50%). The read times, although faster, are only marginally so in per- > char transfer. They're a bit better in block performance, but still > not what I would expect. It would seem to me that a read spread > across four drives should see more than a 45% performance increase. > The highest rate recorded here is only a quarter of the PCI bus- > speed, so I doubt that's a bottleneck. CPU load peaks at 50%, so I > don't see that being a problem either. > > I also ran some performance tests with a stock build of PostgreSQL > 8.0 to get a different angle on things. Two tests were run on each of > the UDMA system drive, the RAID 5 unit, and the RAID 10 unit. The > first tested sequential-scans through a 58,000+ record table. The > second tested random index-scans of the same table. These were read- > only tests -- no write tests were performed. The results are as follows: > > Unit Seq/sec Index/sec > ------------------------------ > single 0.550 2048.983 > raid5 0.533 2063.900 > raid10 0.533 2093.283 > > Any performance benefit of RAID in these tests is almost nonexistent. > Am I doing something wrong? Am I expecting too much? Any advice that > can be offered in this area would be much appreciated. > > Here is my kernel config (the twa driver is loaded as a module): > > machine i386 > cpu I686_CPU > ident NAS-20070124 > > options SCHED_4BSD # 4BSD scheduler > options INET # InterNETworking > options FFS # Berkeley Fast Filesystem > options SOFTUPDATES # Enable FFS soft updates > support > options UFS_ACL # Support for access control > lists > options UFS_DIRHASH # Improve performance on big > directories > options NFSCLIENT # Network Filesystem Client > options NFSSERVER # Network Filesystem Server > options CD9660 # ISO 9660 Filesystem > options PROCFS # Process filesystem > (requires PSEUDOFS) > options PSEUDOFS # Pseudo-filesystem framework > options COMPAT_43 # Compatible with BSD 4.3 > [KEEP THIS!] > options COMPAT_FREEBSD4 # Compatible with FreeBSD4 > options SCSI_DELAY=15000 # Delay (in ms) before > probing SCSI > options SYSVSHM # SYSV-style shared memory > options SYSVMSG # SYSV-style message queues > options SYSVSEM # SYSV-style semaphores > options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real- > time extensions > options ADAPTIVE_GIANT # Giant mutex is adaptive. > > device apic # I/O APIC > > # Bus support. Do not remove isa, even if you have no isa slots > device isa > device pci > > # ATA and ATAPI devices > device ata > device atadisk # ATA disk drives > device atapicd # ATAPI CDROM drives > options ATA_STATIC_ID # Static device numbering > > # SCSI support > device scbus # SCSI bus (required for SCSI) > device da # Direct Access (disks) > > # atkbdc0 controls both the keyboard and the PS/2 mouse > device atkbdc # AT keyboard controller > device atkbd # AT keyboard > > device vga # VGA video card driver > > # syscons is the default console driver, resembling an SCO console > device sc > > # Floating point support - do not disable. > device npx > > # Serial (COM) ports > device sio # 8250, 16[45]50 based serial ports > > # PCI Ethernet NICs that use the common MII bus controller code. > # NOTE: Be sure to keep the 'device miibus' line in order to use > these NICs! > device miibus # MII bus support > device xl # 3com 10/100 > > # Pseudo devices. > device loop # Network loopback > device mem # Memory and kernel memory devices > device io # I/O device > device random # Entropy device > device ether # Ethernet support > device pty # Pseudo-ttys (telnet etc) > > -- > Milo Hyson > CyberLife Labs > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >