Date: Tue, 05 Mar 2002 15:03:00 -0800 From: Lars Eggert <larse@ISI.EDU> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: "Rogier R. Mulhuijzen" <drwilco@drwilco.net>, Julian Elischer <julian@elischer.org>, freebsd-hackers@FreeBSD.ORG Subject: Re: A weird disk behaviour Message-ID: <3C854EA4.5040306@isi.edu> References: <Pine.SOL.4.21.0203051659350.12061-100000@onyx>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] I agree that it's probably caching at some level. You're only writing about 120MB of data (and half that in your second case). Bump these to a couple of GB and see what happens. Also, could you post your actual measurements? Lars Zhihui Zhang wrote: > The machine has 128M memory. I am doing physical I/O one block at a time, > so there should be no memory copy. > > -Zhihui > > On Tue, 5 Mar 2002, Rogier R. Mulhuijzen wrote: > > >>At 16:03 5-3-2002 -0500, Zhihui Zhang wrote: >> >> >> >>>On Tue, 5 Mar 2002, Julian Elischer wrote: >>> >>> >>>>more writes fit in the disk's write cache? >>>> >>>For (1), it writes 15000 * 8192 bytes in all. For (2), it writes 15000 * >>>4096 bytes in all (assuming the random number distributes evenly between 0 >>>and 8192). So your suggestion does not make sense to me. >>> >>How large is your buffercache? it might be that the 15000 * ~4096 roughly >>matches with your cache, and 15000 * 8912 doesn't. >> >>Case (1) would require a lot more physical IO in that case than case (2) >>would require. >> >> Doc >> >> >> >>>-Zhihui >>> >>> >>>>On Tue, 5 Mar 2002, Zhihui Zhang wrote: >>>> >>>> >>>>>I am doing some raw I/O test on a seagate SCSI disk running FreeBSD 4.5. >>>>>This situation is like this: >>>>> >>>>> +-----+----+----+----+----+----+----+----+----+----+---+------ >>>>> | | | | | | | | | | | | .... >>>>> +-----+----+----+----+----+----+----+----+----+----+---+------ >>>>> >>>>>Each block is of fixed size, say 8192 bytes. Now I have a user program >>>>>writing each contiguously laid out block sequentially using /dev/daxxx >>>>>interface. There are a lot of them, say 15000. I write the blocks in two >>>>>ways (the data used in writing are garbage): >>>>> >>>>>(1) Write each block fully and sequentially, ie. 8192 bytes. >>>>> >>>>>(2) I still write these blocks sequentially, but for each block I only >>>>>write part of it. Exactly how many bytes are written inside each >>>>> >>>block is >>> >>>>>determinted by a random number between 512 .. 8192 bytes (rounded up a >>>>>to multiple of 512 bytes). >>>>> >>>>>I find out the the performance of (2) is several times better than the >>>>>performance of (1). Can anyone explain to me why this is the case? >>>>> >>>>>Thanks for any suggestions or hints. >>>>> >>>>>-Zhihui >>>>> >>>>> >>>>> >>>>>To Unsubscribe: send mail to majordomo@FreeBSD.org >>>>>with "unsubscribe freebsd-hackers" in the body of the message >>>>> >>>>> >>>> >>> >>>To Unsubscribe: send mail to majordomo@FreeBSD.org >>>with "unsubscribe freebsd-hackers" in the body of the message >>> >> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > -- Lars Eggert <larse@isi.edu> Information Sciences Institute http://www.isi.edu/larse/ University of Southern California [-- Attachment #2 --] 0 *H 010 + 0 *H 00G0 *H 010 UZA10UWestern Cape10U Cape Town10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 2000.8.300 010824164000Z 020824164000Z0T10 UEggert1 0U*Lars10ULars Eggert10 *H larse@isi.edu00 *H 0 |\Pw v~~FDooӦA\- Cˀ4.)&{肋,z(ܷر߈T7_'txGH^tt/ҹB8%t<#ֲN V0T0*+e!0 00L2uMyffBNUbNJJcdZ2s0U0 larse@isi.edu0U0 0 *H aJPMՒ ]cѭC+kS+wZ1gY",YT41 j6:~℩D~Kؚl=u(ՎM?cF7@}T00G0 *H 010 UZA10UWestern Cape10U Cape Town10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 2000.8.300 010824164000Z 020824164000Z0T10 UEggert1 0U*Lars10ULars Eggert10 *H larse@isi.edu00 *H 0 |\Pw v~~FDooӦA\- Cˀ4.)&{肋,z(ܷر߈T7_'txGH^tt/ҹB8%t<#ֲN V0T0*+e!0 00L2uMyffBNUbNJJcdZ2s0U0 larse@isi.edu0U0 0 *H aJPMՒ ]cѭC+kS+wZ1gY",YT41 j6:~℩D~Kؚl=u(ՎM?cF7@}T0)00 *H 010 UZA10UWestern Cape10U Cape Town10U Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0) *H personal-freemail@thawte.com0 000830000000Z 020829235959Z010 UZA10UWestern Cape10U Cape Town10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 2000.8.3000 *H 0 32c %E>nx'gڈD)c5*mp<ܮto034qmOe KaU5u'rװ|CBPQ<9TIf - ki N0L0)U"0 010UPrivateLabel1-2970U0 0U0 *H so&e4KYbDI j&*bctmSK8P:l4撜n# KrgPo.XPWՈ9[9}4%MjÑ/<RbH100010 UZA10UWestern Cape10U Cape Town10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 2000.8.30G0 + a0 *H 1 *H 0 *H 1 020305230300Z0# *H 1\v4yDb 3XJ0R *H 1E0C0 *H 0*H 0 *H @0+0 *H (0*H 1010 UZA10UWestern Cape10U Cape Town10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 2000.8.30G0 *H Z;VmqU}j=G }.Vyc$gJZxbZAl8-|c!o=' *N(6SP,Ոmɡ.)~h,lJ<c ڌaK9o~y'D"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C854EA4.5040306>
