EmergencyEMERGENCY? Get 24/7 Help Now!

InnoDB page size

 | June 4, 2006 |  Posted In: Insight for DBAs


As maybe you know InnoDB uses hard page size 16Kb for datafiles and for buffer pool.
However this size can be changed if you need it for your workload.

go to file innobase/include/univ.i, lines:

UNIV_PAGE_SIZE is page size (as you see – default value 16Kb). Possible values for UNIV_PAGE_SIZE is 8K, 16K, 32K, 64K. You also have to change UNIV_PAGE_SIZE_SHIFT (according comment it must be 2-logarithm of UNIV_PAGE_SIZE).
For pagesize 8K – UNIV_PAGE_SIZE_SHIFT=13, for 32K – UNIV_PAGE_SIZE_SHIFT=15 and so on.

Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. Vadim leads Percona Labs, which focuses on technology research and performance evaluations of Percona’s and third-party products. Percona Labs designs no-gimmick tests of hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. He also co-authored the book High Performance MySQL: Optimization, Backups, and Replication 3rd Edition.


  • Yes. Playing with different page sizes is good thing to try if you’re trying to get maximum performance. Too bad Innodb currently does not allow to specify it for table or index but it has to be global and requires server rebuild. Generally for certain OLTP workloads you might like to have smaller pages as these allow more distinct peices of data to be in buffer pool. For DSS workloads which require large scans or deal with large rows on the contrary large pages could be good to avoid fragmentation.

  • Page Size and the Five-Minute Rule…

    As the years go by, data pages on disk have to get bigger. 16 KB pages were good for databases in the late 1990’s, but today’s data pages should probably be 64 KB. Page sizes go up over time because memory gets cheaper, and disks get much larger, b…

  • Hi Vadim Tkachenko,

    I like your idea but i cannot config because i don’t know where is this innobase/include/univ.i. I’m using Cent Os

Leave a Reply


Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.