Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-6860

Merge innodb_buffer_pool_pages_LRU_flushed into buf_get_total_stat()

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 8.0.18-9, 5.6.47-87.0, 5.7.29-32
    • 5.7.30-33, 8.0.20-11
    • None
    • None
    • Yes

    Description

      Hey,

       

      Innodb_buffer_pool_pages_LRU_flushed status variable doesn't work, because is not merged in buf_get_total_stat():

      struct buf_pool_stat_t{
      	ulint	n_page_gets;	/*!< number of page gets performed;
      				also successful searches through
      				the adaptive hash index are
      				counted as page gets. */
      	ulint	n_pages_read;	/*!< number read operations.  Accessed
      				atomically. */
      	ulint	n_pages_written;/*!< number write operations.  Accessed
      				atomically.*/
      	ulint	n_pages_created;/*!< number of pages created
      				in the pool with no read */
      	ulint	n_ra_pages_read_rnd;/*!< number of pages read in
      				as part of random read ahead */
      	ulint	n_ra_pages_read;/*!< number of pages read in
      				as part of read ahead */
      	ulint	n_ra_pages_evicted;/*!< number of read ahead
      				pages that are evicted without
      				being accessed */
      	ulint	n_pages_made_young; /*!< number of pages made young, in
      				calls to buf_LRU_make_block_young() */
      	ulint	n_pages_not_made_young; /*!< number of pages not made
      				young because the first access
      				was not long enough ago, in
      				buf_page_peek_if_too_old() */
      
      	ulint	LRU_bytes;	/*!< LRU size in bytes */
      	ulint	flush_list_bytes;/*!< flush_list size in bytes */
      ***
      	ulint	buf_lru_flush_page_count;
      ***
      };
      
      
      UNIV_INTERN
      void
      buf_get_total_stat(
      /*===============*/
      	buf_pool_stat_t*	tot_stat)	/*!< out: buffer pool stats */
      {
      	ulint			i;
      
      	memset(tot_stat, 0, sizeof(*tot_stat));
      
      	for (i = 0; i < srv_buf_pool_instances; i++) {
      		buf_pool_stat_t*buf_stat;
      		buf_pool_t*	buf_pool;
      
      		buf_pool = buf_pool_from_array(i);
      
      		buf_stat = &buf_pool->stat;
      		tot_stat->n_page_gets += buf_stat->n_page_gets;
      		tot_stat->n_pages_read += buf_stat->n_pages_read;
      		tot_stat->n_pages_written += buf_stat->n_pages_written;
      		tot_stat->n_pages_created += buf_stat->n_pages_created;
      		tot_stat->n_ra_pages_read_rnd += buf_stat->n_ra_pages_read_rnd;
      		tot_stat->n_ra_pages_read += buf_stat->n_ra_pages_read;
      		tot_stat->n_ra_pages_evicted += buf_stat->n_ra_pages_evicted;
      		tot_stat->n_pages_made_young += buf_stat->n_pages_made_young;
      
      		tot_stat->n_pages_not_made_young +=
      			buf_stat->n_pages_not_made_young;
      	}
      }
       
      

      a small fix:

      index 9d3e5b3..1db6770 100644
      --- a/storage/innobase/buf/buf0buf.cc
      +++ b/storage/innobase/buf/buf0buf.cc
      @@ -467,6 +467,8 @@ buf_get_total_stat(
       
                      tot_stat->n_pages_not_made_young +=
                              buf_stat->n_pages_not_made_young;
      +
      +               tot_stat->buf_lru_flush_page_count += buf_stat->buf_lru_flush_page_count;
              }
       }
       
      

      does the trick.

      Attachments

        Activity

          People

            george.lorch George Lorch (Inactive)
            iwo.panowicz Iwo Panowicz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Time Spent - 5 hours, 5 minutes Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - 5 hours, 5 minutes Remaining Estimate - 10 minutes
                5h 5m

                Smart Checklist