Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2007

Tip: Looking for answers? Try searching our database.

What's the meaning of DISK

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 23 May 2007 15:31 GMT
CASE 1:
The following sentences were copied from the book "Administration
Guide Performance".

"If more pages have been written to disk, recovery of the database is
faster after a system crash because the database manager can rebuild
more of the buffer pool from disk instead of having to replay
transactions from the database log files."

My question is:
How to understand "rebuild buffer pool from disk"?  Where is buffer
pool stored in disk?

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 written to disk, it
is considered clean again and remains in the buffer pool until its
space is needed for new pages. Page cleaner processes clean up the
buffer pool by writing dirty pages to disk. There are three types of
cleaning activities that can cause a page cleaner to take action and
remove a page or more from the buffer pool:
LSN Gap Triggers (e.g. Log Cleans)
Dirty Page Threshold Triggers (e.g. Threshold Cleans)
Dirty Page Steal Triggers (e.g. Victim Cleans)

My question is:
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?

Thanks in advance!!

James
Haider Rizvi - 23 May 2007 16:39 GMT
> 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

Ian - 23 May 2007 17:04 GMT
> 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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.