![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 -------------------------------------------------------------------- |
#3
| |||
| |||
|
|
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. :-) |
#4
| |||
| |||
|
|
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. |
|
Hope that helps. Regards, -sunny |
#5
| |||
| |||
|
|
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? |
#6
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |