Re: DBWn performs batched (multiblock) writes to improve efficiency

Hi, Tanel:
    I did a test again. I tried both batch delete, and checkpoint. Test
result shows it is always single block write. Maybe My test is limited, but
I did not see multiblockk write.
    Can you verify:

--solaris 8,vxvm raw datafile, and ufs datafile.
[oracle@main-db6**testdb]$cat dbwr_write.log |grep  "kaio(AIOWRITE" |awk
'{print $4}' |uniq
8192,

I also used vxstat -g rootdg -i 2 -c 1000, write the output to a logfile.
and ,
160
[root@V480 /]# cat vx.log | awk '{print $4, $2}' |grep -v "0 0" |awk '{print
$1/$2}'|uniq
16
vxvm blocksize is 512bytes, that is 8k(my db block size).

So the dbwr is still writing in 8K, that is a single blocksize.

I also created a tablespace on UFS filesystem and did the same test.
 cat dbw2.log |grep "pwrite(404"  |awk -F, '{print $3}'
      ----here 404 is the datafile on ufs, got via the lsof -p dbwr command
It shows all of the dbwr wriet is 8k, which is again the db_block_size.


I also tried set _dbwr_trace=8 and restarted the instance, there is no
tracefile generated.

Regards
Zhu Chao


----- Original Message ----- 
From: "Tanel Põder" <tanel.poder.003@xxxxxxx>
To: <oracle-l@xxxxxxxxxxxxx>
Sent: Monday, April 19, 2004 12:17 AM
Subject: Re: DBWn performs batched (multiblock) writes to improve efficiency


> Hi!
>
> I definitely have seen multiblock pwrites in dbwr's truss/strace output
(you
> can also see write coalescing from dbwr trace if you set _dbwr_tracing to
8.
> Note that it generates quite a lot of trace so don't set it in
production).
>
> Of course the blocks to be written written to disk have to be adjacent in
> order to use a multiblock write.
>
> Do a full delete on a test table for example, you should see some
multiblock
> writes then. Whether adjacent blocks' corresponding dirty buffers are
> written to disk using a multiblock or single block write, is dependent on
> dbwr's internal batch composition algorithm, LRU list contents, "hotness"
of
> a block and incremental checkpoint agressiveness, so it's nothing unusual
if
> adjacent dirty blocks are written to disk on different times with
different
> write calls...
>
> Tanel.
>
> ----- Original Message ----- 
> From: "zhu chao" <chao_ping@xxxxxxxxxxx>
> To: <oracle-l@xxxxxxxxxxxxx>
> Sent: Sunday, April 18, 2004 5:34 PM
> Subject: DBWn performs batched (multiblock) writes to improve efficiency
>
>
> > From oracle 9i database concepts manual, I saw note:
> > In all cases, DBWn performs batched (multiblock) writes to improve
> efficiency. The number of blocks written in a multiblock write varies by
> operating system.
> >
> > link:
>
http://www.cise.ufl.edu/help/database/oracle-docs/server.920/a96524/c09procs.htm
> >
> > I have difficulty understanding this.
> >
> > I did several test on my database, no matter datafiles on raw device, or
> on general ufs/vxfs, I never saw dbwr do batched(multiblock) write.
> >
> > The following is the result of truss -p dbwr:
> >
> > datafiles on raw device:
> >
> > aio(AIOWRITE, 407, 0x3870AA000, 8192, 0xB383800001FF0980) = 0
> > kaio(AIOWRITE, 407, 0x3830A2000, 8192, 0xB38400000223E458) = 0
> > kaio(AIOWRITE, 403, 0x38242E000, 8192, 0x3AAD400001FCA8C8) = 0
> > kaio(AIOWRITE, 407, 0x382A2A000, 8192, 0xB38460000205ABF0) = 0
> > kaio(AIOWRITE, 403, 0x380EB6000, 8192, 0x3AAE00000202AE80) = 0
> > kaio(AIOWRITE, 404, 0x385D58000, 8192, 0x0D578000020AF8D0) = 0
> >
> > datafiles on vxfs filesystem without QuickIO:
> >
> > pwrite(397, "0602\0\00301AC 0 & C90 ~".., 8192, 0x35860000) = 8192
> > lwp_mutex_lock(0xFFFFFFFF7DD09EC0)              = 0
> > pwrite(373, "0602\0\016\09D x & C89 V".., 8192, 0x13AF0000) = 8192
> > pwrite(396, "0602\0\003 CC0DE & C x }".., 8192, 0x781BC000) = 8192
> > lwp_mutex_wakeup(0xFFFFFFFF7DD09EC0)            = 0
> > lwp_mutex_wakeup(0xFFFFFFFF7DD09EC0)            = 0
> > pwrite(399, "0602\0\00281EC ] & BB6F7".., 8192, 0x3D8BA000) = 8192
> > lwp_mutex_lock(0xFFFFFFFF7DD09EC0)              = 0
> > pwrite(397, "0602\0\00301ABCD & CC0FF".., 8192, 0x3579A000) = 8192
> >
> > I trussed many times, I never saw any os call like pwrite(xxx)=16384
etc.
> Nor have I saw kaio(aiowrite,xxx,xxx,16384,xxx) etc.
> >
> > Can someone confirm it? Do I misunderstand the manual, or the manual
> itself is wrong, or simply I did not understand the truss output
correctly?
> >
> >
> >
> > Hope someone can give guidance.
> >
> >
> >
> > Regards
> >
> > Zhu Chao.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > ----------------------------------------------------------------
> > To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> > put 'unsubscribe' in the subject line.
> > --
> > Archives are at http://www.freelists.org/archives/oracle-l/
> > FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> > -----------------------------------------------------------------
> >
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
>

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: