From owner-freebsd-questions@FreeBSD.ORG Sun Jan 28 02:05:58 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 C319816A400 for ; Sun, 28 Jan 2007 02:05:58 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from bay0-omc3-s40.bay0.hotmail.com (bay0-omc3-s40.bay0.hotmail.com [65.54.246.240]) by mx1.freebsd.org (Postfix) with ESMTP id B142613C47E for ; Sun, 28 Jan 2007 02:05:58 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from BAYC1-PASMTP13.CEZ.ICE ([65.54.191.173]) by bay0-omc3-s40.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 27 Jan 2007 18:05:58 -0800 X-Originating-IP: [74.13.200.101] X-Originating-Email: [pmatulis@sympatico.ca] Received: from [192.168.3.10] ([74.13.200.101]) by BAYC1-PASMTP13.CEZ.ICE over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Sat, 27 Jan 2007 18:06:40 -0800 From: Peter Matulis To: freebsd-questions@freebsd.org Date: Sat, 27 Jan 2007 21:06:19 -0500 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701272106.19135.pmatulis@sympatico.ca> X-OriginalArrivalTime: 28 Jan 2007 02:06:40.0906 (UTC) FILETIME=[F35576A0:01C74280] 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: Sun, 28 Jan 2007 02:05:58 -0000 On 6.2 STABLE GENERIC, I have set up RAID0 using gstripe on two SATA drives and installed benchmarks/raidtest for testing. The array is known as /dev/stripe/data. These were my steps: # export mediasize=`diskinfo /dev/stripe/data | awk '{print $3}'` # export sectorsize=`diskinfo /dev/stripe/data | awk '{print $2}'` # raidtest genfile -s $mediasize -S $sectorsize -n 50000 # ls -rw-r--r-- 1 root super 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 1222 raidtest CALL open(0xbfbfed3f,0,0x8049e6c) 1222 raidtest NAMI "raidtest.data" 1222 raidtest RET open 3 1222 raidtest CALL fstat(0x3,0xbfbfeb30) 1222 raidtest RET fstat 0 1222 raidtest CALL open(0xbfbfed28,0x10002,0x8049e6c) 1222 raidtest NAMI "/dev/stripe/data" 1222 raidtest RET open -1 errno 1 Operation not permitted 1222 raidtest CALL write(0x2,0xbfbde3d0,0xa) 1222 raidtest GIO fd 2 wrote 10 bytes "raidtest: " 1222 raidtest RET write 10/0xa 1222 raidtest CALL write(0x2,0xbfbde3f0,0x22) 1222 raidtest GIO fd 2 wrote 34 bytes "Cannot open 'raidtest.data' device" 1222 raidtest RET write 34/0x22 1222 raidtest CALL write(0x2,0x2813ed98,0x2) 1222 raidtest GIO fd 2 wrote 2 bytes ": " 1222 raidtest RET write 2 1222 raidtest CALL write(0x2,0xbfbde3d0,0x18) 1222 raidtest GIO fd 2 wrote 24 bytes "Operation not permitted " 1222 raidtest RET write 24/0x18 1222 raidtest CALL exit(0x1) --------------------------------------- Looks like the gstripe label (/dev/stripe/data) is not available somehow. Is there any known workaround? --------------------------------------- Port info: This utility can be used to test performance of storage devices. First, one need to generate file with I/O operations: # set mediasize=`diskinfo /dev/ | awk '{print $3}'` # set sectorsize=`diskinfo /dev/ | awk '{print $2}'` # 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 or equal to 128kB (maxium size of I/O request). I/O request type (READ or WRITE) is random as well. All test data are stored in 'raidtest.data' file in current working directory. To run test, one should type: # raidtest test -d /dev/ -n 10 This command will read test data from 'raidtest.data' file, run 10 processes which will be used to send requests to the given device in parallel. When test is finished you will see statistics: Bytes per second: Requests per second: If you compare performance of two storage devices, use the same data file! usage: raidtest genfile [-frw] <-s mediasize> [-S sectorsize] <-n nrequests> [file] raidtest test [-Rrw] <-d device> [-n processes] [file] where: -d device path to tested device -f if raidtest.data file or specified file already exists, remove it and create new one -n nrequests number of requests to generate -n processes number of processes to run -r generate/run only READ requests -R generate random data for write requests -s size of destination device -S sector size of destination device -w generate/run only WRITE requests file path to the data file instead of default 'raidtest.data'