> CASE 1: The following sentences were copied from the book
> "Administration Guide Performance".
[quoted text clipped - 6 lines]
> My question is: How to understand "rebuild buffer pool from disk"?
> Where is buffer pool stored in disk?
Bufferpool pages, when first populated, are simple replica of pages on
disk. As transactions happen, these bp pages get "dirty". Before these
pages are dirtied, any changes are put in logs using write-ahead
logging (search the web for write-ahead logging or Aries for
details). These bp dirty pages are eventually written out to disk at
an opportune time, bringing the bp pages to a clean state thus making
them ready to be evicted if need be.
Hopefully this answers your 2nd question as well.
> CASE 2: As we know, dirty pages contain data that has been changed
> but has not yet been written to disk. After a changed page is
[quoted text clipped - 14 lines]
>
> James

Signature
Haider
> CASE 1:
> The following sentences were copied from the book "Administration
[quoted text clipped - 8 lines]
> How to understand "rebuild buffer pool from disk"? Where is buffer
> pool stored in disk?
It's not. Dirty bufferpool pages are written back to disk by the page
cleaners.
After a database crash, it's often the case that there were dirty pages
in the bufferpool that hadn't been written to disk. So DB2 needs a way
to make sure that the tablespace pages on disk get this information,
and it does this keeping track of the LSN of the oldest dirty page in
the bufferpool(s).
DB2 keeps track of 2 things:
LSN of the oldest uncommitted transaction (called LowTranLSN)
LSN of the oldest dirty page in the bufferpool (called MinBufLSN)
When doing crash recovery, DB2 determines uses the minimum of these 2
LSNs to as the starting point for replaying the log files.
So, the statement you're asking about is basically saying that if
MinBufLSN is always greater than LowTranLSN, your crash recovery will be
faster -- because DB2 will spend less time rebuilding the dirty pages
that were in the bufferpool at the time of the crash. (i.e., there were
fewer dirty pages).
> CASE 2:
> As we know, dirty pages contain data that has been changed but has not
[quoted text clipped - 11 lines]
> Except moving data into log files, where are the other dirty pages
> moved to? If the are written to a temporary disk space, where is it?
They are written back to the tablespaces where they came from.
James - 24 May 2007 04:10 GMT
> > CASE 1:
> > The following sentences were copied from the book "Administration
[quoted text clipped - 49 lines]
>
> They are written back to the tablespaces where they came from.
Prefetcher loads pages from disk to buffer pool. All these pages are
clean before they are modified. When a page is modified, but this
change has not been committed by transaction, this page becomes a
dirty page. This dirty page is still in buffer pool and page cleaner
writes this dirty page into log. If DB2 use write-ahead to record all
changes into log, this page was written into log before it was
changed. (Write to log before and after changes??) If the transaction
is committed, this dirty page is written into the table which it comes
from. If the transaction is rollback, where will the dirty page go? I
dont' think it will be written into the table space where it comes
from. Do I misunderstand the whole process? I would really appreciate
if someone can show me a whole process.
When database crash, where will the dirty page go if this dirty has
not been committed? How does DB2 rebuild buffer pool? I think DB2 will
write all buffer pool into a temporary file on hard disk when database
crash. Is my thought right? I would really appreciate if someone give
a correct point.
Thanks in advance!
James - 24 May 2007 04:11 GMT
> > CASE 1:
> > The following sentences were copied from the book "Administration
[quoted text clipped - 49 lines]
>
> They are written back to the tablespaces where they came from.
Prefetcher loads pages from disk to buffer pool. All these pages are
clean before they are modified. When a page is modified, but this
change has not been committed by transaction, this page becomes a
dirty page. This dirty page is still in buffer pool and page cleaner
writes this dirty page into log. If DB2 use write-ahead to record all
changes into log, this page was written into log before it was
changed. (Write to log before and after changes??) If the transaction
is committed, this dirty page is written into the table which it comes
from. If the transaction is rollback, where will the dirty page go? I
dont' think it will be written into the table space where it comes
from. Do I misunderstand the whole process? I would really appreciate
if someone can show me a whole process.
When database crash, where will the dirty page go if this dirty has
not been committed? How does DB2 rebuild buffer pool? I think DB2 will
write all buffer pool into a temporary file on hard disk when database
crash. Is my thought right? I would really appreciate if someone give
a correct point.
Thanks in advance!
James - 24 May 2007 04:12 GMT
> > CASE 1:
> > The following sentences were copied from the book "Administration
[quoted text clipped - 49 lines]
>
> They are written back to the tablespaces where they came from.
Prefetcher loads pages from disk to buffer pool. All these pages are
clean before they are modified. When a page is modified, but this
change has not been committed by transaction, this page becomes a
dirty page. This dirty page is still in buffer pool and page cleaner
writes this dirty page into log. If DB2 use write-ahead to record all
changes into log, this page was written into log before it was
changed. (Write to log before and after changes??) If the transaction
is committed, this dirty page is written into the table which it comes
from. If the transaction is rollback, where will the dirty page go? I
dont' think it will be written into the table space where it comes
from. Do I misunderstand the whole process? I would really appreciate
if someone can show me a whole process.
When database crash, where will the dirty page go if this dirty has
not been committed? How does DB2 rebuild buffer pool? I think DB2 will
write all buffer pool into a temporary file on hard disk when database
crash. Is my thought right? I would really appreciate if someone give
a correct point.
Thanks in advance!
James - 24 May 2007 04:13 GMT
> > CASE 1:
> > The following sentences were copied from the book "Administration
[quoted text clipped - 49 lines]
>
> They are written back to the tablespaces where they came from.
Prefetcher loads pages from disk to buffer pool. All these pages are
clean before they are modified. When a page is modified, but this
change has not been committed by transaction, this page becomes a
dirty page. This dirty page is still in buffer pool and page cleaner
writes this dirty page into log. If DB2 use write-ahead to record all
changes into log, this page was written into log before it was
changed. (Write to log before and after changes??) If the transaction
is committed, this dirty page is written into the table which it comes
from. If the transaction is rollback, where will the dirty page go? I
dont' think it will be written into the table space where it comes
from. Do I misunderstand the whole process? I would really appreciate
if someone can show me a whole process.
When database crash, where will the dirty page go if this dirty has
not been committed? How does DB2 rebuild buffer pool? I think DB2 will
write all buffer pool into a temporary file on hard disk when database
crash. Is my thought right? I would really appreciate if someone give
a correct point.
Thanks in advance!