Search

Top 60 Oracle Blogs

Recent comments

Private Redo

Following a question on the Oracle Core Addenda pages, here’s a little script to tell you about the sizes of the public and private redo threads currently active in the instance. It’s a minor variation of a script I published in Appendix D (Dumping and Debugging), page 237 to show the addresses of current activity in the various log buffers:

select
	indx,
	total_bufs_kcrfa,
	strand_size_kcrfa,
	index_kcrf_pvt_strand,
	space_kcrf_pvt_strand
from
	x$kcrfstrand
/

      INDX TOTAL_BUFS_KCRFA STRAND_SIZE_KCRFA INDEX_KCRF_PVT_STRAND SPACE_KCRF_PVT_STRAND
---------- ---------------- ----------------- --------------------- ---------------------
         0             6821           3492352                     0                     0
         1             6821           3492352                     0                     0
         2              125             66560                     2                 62976
         3              125             66560            3735928559                 62976
         4              125             66560            3735928559                 62976
         5              125             66560            3735928559                 62976
         6              125             66560            3735928559                 62976
         7              125             66560                     0                     0
         8              125             66560                     0                     0
         9              125             66560                     0                     0
        10              125             66560                     0                     0
...
        48              125             66560                     0                     0
        49              125             66560                     0                     0

50 rows selected.

As you can see, I have 50 log buffers – and by examination of sizes (if nothing else) we can assume that the first two are the public redo threads at a little under 3.5MB each, and the remaining 48 threads are private redo threads at roughly 64KB each. Comparing the total_bufs with the strand_size you can infer that the block size for the buffers (hence log file) are 512 bytes each. Finally, the space_kcrf_pvt_strand (for the private threads) tells you the number of private threads that have actually been brought into play is five.

Notice that the private threads that have been used also have a non-zero value for index_kcrf_pct_strand – when the thread is actually in use this matches the indx column, and when the thread is not in use it gets set to 3735928559. If you’re wondering about the significance of that number, I think it’s a programmer in Oracle with a (strange) sense of humour – convert to hex and the value reads: “DEAD BEEF”. (There are other places in the code where the value “DEAD FACE” appears in, for example, memory locations that mark the boundaries between critical objects.)