From owner-freebsd-questions@FreeBSD.ORG Fri Feb 2 21:28:57 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 8662816A400 for ; Fri, 2 Feb 2007 21:28:57 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from bay0-omc2-s31.bay0.hotmail.com (bay0-omc2-s31.bay0.hotmail.com [65.54.246.167]) by mx1.freebsd.org (Postfix) with ESMTP id 7359F13C441 for ; Fri, 2 Feb 2007 21:28:57 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from bayc1-pasmtp11.bayc1.hotmail.com ([65.54.191.171]) by bay0-omc2-s31.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 2 Feb 2007 13:28:57 -0800 X-Originating-IP: [70.53.155.213] X-Originating-Email: [pmatulis@sympatico.ca] Received: from tantra ([70.53.155.213]) by bayc1-pasmtp11.bayc1.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Feb 2007 13:40:31 -0800 From: Peter To: freebsd-questions@freebsd.org Date: Fri, 2 Feb 2007 16:28:59 -0500 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200702021628.59553.pmatulis@sympatico.ca> X-OriginalArrivalTime: 02 Feb 2007 21:40:32.0015 (UTC) FILETIME=[C39C91F0:01C74712] Subject: trouble using raidtest on gstripe array 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: Fri, 02 Feb 2007 21:28:57 -0000 On 6.2 STABLE GENERIC, I have set up RAID0 using gstripe on two SATA=20 drives and installed benchmarks/raidtest for testing. The array is known as /dev/stripe/data. These were my steps: # export mediasize=3D`diskinfo /dev/stripe/data | awk '{print $3}'` # export sectorsize=3D`diskinfo /dev/stripe/data | awk '{print $2}'` # raidtest genfile -s $mediasize -S $sectorsize -n 50000 # ls =2Drw-r--r-- =A01 root =A0super =A0 781K Jan 27 08:42 raidtest.data # raidtest test -d /dev/stripe/data -n 10 raidtest.data raidtest: Cannot open 'raidtest.data' device: Operation not permitted # ktrace raidtest test -d /dev/stripe/data -n 10 raidtest.data # kdump =A0 1222 raidtest CALL =A0open(0xbfbfed3f,0,0x8049e6c) =A0 1222 raidtest NAMI =A0"raidtest.data" =A0 1222 raidtest RET =A0 open 3 =A0 1222 raidtest CALL =A0fstat(0x3,0xbfbfeb30) =A0 1222 raidtest RET =A0 fstat 0 =A0 1222 raidtest CALL =A0open(0xbfbfed28,0x10002,0x8049e6c) =A0 1222 raidtest NAMI =A0"/dev/stripe/data" =A0 1222 raidtest RET =A0 open -1 errno 1 Operation not permitted =A0 1222 raidtest CALL =A0write(0x2,0xbfbde3d0,0xa) =A0 1222 raidtest GIO =A0 fd 2 wrote 10 bytes =A0 =A0 =A0 =A0"raidtest: " =A0 1222 raidtest RET =A0 write 10/0xa =A0 1222 raidtest CALL =A0write(0x2,0xbfbde3f0,0x22) =A0 1222 raidtest GIO =A0 fd 2 wrote 34 bytes =A0 =A0 =A0 =A0"Cannot open 'raidtest.data' device" =A0 1222 raidtest RET =A0 write 34/0x22 =A0 1222 raidtest CALL =A0write(0x2,0x2813ed98,0x2) =A0 1222 raidtest GIO =A0 fd 2 wrote 2 bytes =A0 =A0 =A0 =A0": " =A0 1222 raidtest RET =A0 write 2 =A0 1222 raidtest CALL =A0write(0x2,0xbfbde3d0,0x18) =A0 1222 raidtest GIO =A0 fd 2 wrote 24 bytes =A0 =A0 =A0 =A0"Operation not permitted =A0 =A0 =A0 =A0" =A0 1222 raidtest RET =A0 write 24/0x18 =A0 1222 raidtest CALL =A0exit(0x1) =2D-------------------------------------- Looks like the gstripe label (/dev/stripe/data) is not available=20 somehow. =A0Is there any known workaround? =2D-------------------------------------- Port info: This utility can be used to test performance of storage devices. =46irst, one need to generate file with I/O operations: =A0 =A0 =A0 =A0 # set mediasize=3D`diskinfo /dev/ | awk '{print $3}= '` =A0 =A0 =A0 =A0 # set sectorsize=3D`diskinfo /dev/ | awk '{print $2= }'` =A0 =A0 =A0 =A0 # raidtest genfile -s $mediasize -S $sectorsize -n 50000 It will generate test which contains 50000 I/O requests with random size and random offset. Size is a multiple of sectorsize, but less than=20 or equal to 128kB (maxium size of I/O request). I/O request type (READ or=20 WRITE) is random as well. All test data are stored in 'raidtest.data' file in current working=20 directory. To run test, one should type: =A0 =A0 =A0 =A0 # raidtest test -d /dev/ -n 10 This command will read test data from 'raidtest.data' file, run 10=20 processes which will be used to send requests to the given device in parallel. When test is finished you will see statistics: =A0 =A0 =A0 =A0 Bytes per second: =A0 =A0 =A0 =A0 Requests per second: If you compare performance of two storage devices, use the same data=20 file! usage: raidtest genfile [-frw] <-s mediasize> [-S sectorsize] <-n=20 nrequests> [file] =A0 =A0 =A0 =A0raidtest test [-Rrw] <-d device> [-n processes] [file] where: =A0 =A0 =A0 =A0 -d device =A0 =A0 =A0 path to tested device =A0 =A0 =A0 =A0 -f =A0 =A0 =A0 =A0 =A0 =A0 =A0if raidtest.data file or spec= ified file already=20 exists, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 remove it and create new one =A0 =A0 =A0 =A0 -n nrequests =A0 =A0number of requests to generate =A0 =A0 =A0 =A0 -n processes =A0 =A0number of processes to run =A0 =A0 =A0 =A0 -r =A0 =A0 =A0 =A0 =A0 =A0 =A0generate/run only READ reques= ts =A0 =A0 =A0 =A0 -R =A0 =A0 =A0 =A0 =A0 =A0 =A0generate random data for writ= e requests =A0 =A0 =A0 =A0 -s =A0 =A0 =A0 =A0 =A0 =A0 =A0size of destination device =A0 =A0 =A0 =A0 -S =A0 =A0 =A0 =A0 =A0 =A0 =A0sector size of destination de= vice =A0 =A0 =A0 =A0 -w =A0 =A0 =A0 =A0 =A0 =A0 =A0generate/run only WRITE reque= sts =A0 =A0 =A0 =A0 file =A0 =A0 =A0 =A0 =A0 =A0path to the data file instead o= f=20 default 'raidtest.data'