dbTalk Databases Forums  

questions on undo log

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss questions on undo log in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Xuekun Hu
 
Posts: n/a

Default questions on undo log - 01-31-2012 , 03:00 AM






Hi, Guys

When reading innodb code, I'm little confused about the relationship
between innodb buffer pool and undo log:

From my understanding, in disk tablespace files, undo log can be
divided into two parts: rollback segments (1023 slots per segment) and
the undo space pointered by slot.

So my question is which part is cached in innodb buffer pool? *the
slot? or also the undo space?

BTW. If anyone knows any available doc to describe the internal of
innodb undo log mechanism, that should be very helpful to me. :-)

Many thanks. - Xuekun

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
  #2  
Old   
Xuekun Hu
 
Posts: n/a

Default Re: questions on undo log - 02-07-2012 , 07:02 PM






Hi, Libing

Many thanks. From the file page types definition, I found
FIL_PAGE_UNDO_LOG which should represent the undo log page in buffer
pool. So it also means every change to undo log page in buffer pool
also follows the page flushing mechanism of buffer pool (writing to
disk in background, writing to doublewrite buffer, writing the changes
to transaction log etc). My understanding is right?

However I also think it is not very accurate about "Innodb buffer pool
is for all things in table spaces" like you said. :-) I think it
should exclude the data dictionary which has own memory cache and
doublewrite buffer. :-)

Thx, Xuekun

On Tue, Feb 7, 2012 at 10:43 PM, Song Libing <slb.songlibing (AT) gmail (DOT) com> wrote:
Quote:
On Tue, Jan 31, 2012 at 5:00 PM, Xuekun Hu <xuekun.hu (AT) gmail (DOT) com> wrote:
Hi Xuekun,
IMO, Innodb buffer pool is for all things in table spaces.
It is the method to cache all pages in table spaces.
So undo log, both (slot and undo log space) are included.
The slot is in undo log segment header page.

Hi, Guys

When reading innodb code, I'm little confused about the relationship
between innodb buffer pool and undo log:

From my understanding, in disk tablespace files, undo log can be
divided into two parts: rollback segments (1023 slots per segment) and
the undo space pointered by slot.

So my question is which part is cached in innodb buffer pool? Â*the
slot? or also the undo space?

BTW. If anyone knows any available doc to describe the internal of
innodb undo log mechanism, that should be very helpful to me. :-)

Many thanks. Â*- Xuekun

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: Â* Â*http://lists.mysql.com/internals




--
Sincerely

Song Libing
宋 Â* Â* 利兵
-------------------------------------------------------------------
Software Engineer
Email: slb.songlibing (AT) gmail (DOT) com
Blog: http://www.mysqlops.com/author/sleebin9
--------------------------------------------------------------------
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
  #3  
Old   
Sunny Bains
 
Posts: n/a

Default Re: questions on undo log - 02-07-2012 , 07:50 PM



Xuekun,

On 08/02/2012, at 12:02 PM, Xuekun Hu wrote:

Quote:
Hi, Libing

Many thanks. From the file page types definition, I found
FIL_PAGE_UNDO_LOG which should represent the undo log page in buffer
pool. So it also means every change to undo log page in buffer pool
also follows the page flushing mechanism of buffer pool (writing to
disk in background, writing to doublewrite buffer, writing the changes
to transaction log etc). My understanding is right?

However I also think it is not very accurate about "Innodb buffer pool
is for all things in table spaces" like you said. :-) I think it
should exclude the data dictionary which has own memory cache and
doublewrite buffer. :-)
Song Libing is correct. The data dictionary cache is simply another view
of the data dictionary that is on disk. There is no separate buffer pool
for the dictionary cache and it doesn't have a separate double write buffer.

Hope that helps.

Regards,
-sunny

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
  #4  
Old   
Xuekun Hu
 
Posts: n/a

Default Re: questions on undo log - 02-07-2012 , 08:03 PM



Hi, sunny

On Wed, Feb 8, 2012 at 9:50 AM, Sunny Bains <Sunny.Bains (AT) oracle (DOT) com> wrote:
Quote:
Xuekun,

On 08/02/2012, at 12:02 PM, Xuekun Hu wrote:

Hi, Libing

Many thanks. From the file page types definition, I found
FIL_PAGE_UNDO_LOG which should represent the undo log page in buffer
pool. So it also means every change to undo log page in buffer pool
also follows the page flushing mechanism of buffer pool (writing to
disk in background, writing to doublewrite buffer, writing the changes
to transaction log etc). My understanding is right?

However I also think it is not very accurate about "Innodb buffer pool
is for all things in table spaces" like you said. :-) I think it
should exclude the data dictionary which has own memory cache and
doublewrite buffer. :-)

Song Libing is correct. *The data dictionary cache is simply another view
of the data dictionary that is on disk. There is no separate buffer pool
for the dictionary cache and it doesn't have a separate double write buffer.

Sorry, I don't quite understand the meanings of "separate". You mean
the dictionary cache is a part of buffer pool? Also the 2MB of
doublewrite buffer in memory is also a part of buffer pool?

Quote:
Hope that helps.

Regards,
-sunny
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
  #5  
Old   
Sunny Bains
 
Posts: n/a

Default Re: questions on undo log - 02-07-2012 , 08:19 PM



Xuekun,

On 08/02/2012, at 1:03 PM, Xuekun Hu wrote:

Quote:
Hi, sunny

On Wed, Feb 8, 2012 at 9:50 AM, Sunny Bains <Sunny.Bains (AT) oracle (DOT) com> wrote:
Xuekun,

On 08/02/2012, at 12:02 PM, Xuekun Hu wrote:

Hi, Libing

Many thanks. From the file page types definition, I found
FIL_PAGE_UNDO_LOG which should represent the undo log page in buffer
pool. So it also means every change to undo log page in buffer pool
also follows the page flushing mechanism of buffer pool (writing to
disk in background, writing to doublewrite buffer, writing the changes
to transaction log etc). My understanding is right?

However I also think it is not very accurate about "Innodb buffer pool
is for all things in table spaces" like you said. :-) I think it
should exclude the data dictionary which has own memory cache and
doublewrite buffer. :-)

Song Libing is correct. The data dictionary cache is simply another view
of the data dictionary that is on disk. There is no separate buffer pool
for the dictionary cache and it doesn't have a separate double write buffer.


Sorry, I don't quite understand the meanings of "separate". You mean
the dictionary cache is a part of buffer pool? Also the 2MB of
doublewrite buffer in memory is also a part of buffer pool?
There are many sub-systems that use the buffer pool as a backing store. Heap
creation takes a flag that determines which backing store to use. Using the buffer
pool memory is one such flag. By separate I meant that the data dictionary doesn't
use a special double write buffer.

Regards,
-sunny
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
  #6  
Old   
Xuekun Hu
 
Posts: n/a

Default Re: questions on undo log - 02-07-2012 , 08:44 PM



Sunny

Got it. Many thanks.

On Wed, Feb 8, 2012 at 10:19 AM, Sunny Bains <Sunny.Bains (AT) oracle (DOT) com> wrote:
Quote:
Xuekun,

On 08/02/2012, at 1:03 PM, Xuekun Hu wrote:

Hi, sunny

On Wed, Feb 8, 2012 at 9:50 AM, Sunny Bains <Sunny.Bains (AT) oracle (DOT) com> wrote:
Xuekun,

On 08/02/2012, at 12:02 PM, Xuekun Hu wrote:

Hi, Libing

Many thanks. From the file page types definition, I found
FIL_PAGE_UNDO_LOG which should represent the undo log page in buffer
pool. So it also means every change to undo log page in buffer pool
also follows the page flushing mechanism of buffer pool (writing to
disk in background, writing to doublewrite buffer, writing the changes
to transaction log etc). My understanding is right?

However I also think it is not very accurate about "Innodb buffer pool
is for all things in table spaces" like you said. :-) I think it
should exclude the data dictionary which has own memory cache and
doublewrite buffer. :-)

Song Libing is correct. *The data dictionary cache is simply another view
of the data dictionary that is on disk. There is no separate buffer pool
for the dictionary cache and it doesn't have a separate double write buffer.


Sorry, I don't quite understand the meanings of "separate". You mean
the dictionary cache is a part of buffer pool? Also the 2MB of
doublewrite buffer in memory *is also a part of buffer pool?

There are many sub-systems that use the buffer pool as a backing store. *Heap
creation takes a flag that determines which backing store to use. *Using the buffer
pool memory is one such flag. By separate I meant that the data dictionary doesn't
use a special double write buffer.

Regards,
-sunny
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.