# changing innodb\_buffer\_pool\_size dynamically

**URL:** <https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124>\
**Category:** Other MySQL® Questions\
**Created:** [November 20, 2006, 1:36pm UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124 "2006-11-20T13:36:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![umafm13](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@umafm13](https://forums.percona.com/u/umafm13)\
**Post date:** [November 20, 2006, 1:36pm UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124/1 "2006-11-20T13:36:50Z")

</div>

Hi everyone,

I am just starting to develop with MySQL. What I want to be able to do is to change the size of innodb\_buffer\_pool\_size through some programming interface(preferably in c) on the fly. Is it possible to do so at all ? Are there multiple ways to do it ? Any easy alternatives ? Can anyone point me in the right direction ? I’ll appreciate your help.

Thank you.

-Umar

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [November 20, 2006, 1:42pm UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124/2 "2006-11-20T13:42:42Z")

</div>

No it is not possible in MySQL 5.0

In MySQL 5.1 it may be possible - there is a patch by Innobase to do so but I do not know if it is accepted already.

---

<div class="post-metadata">

**Author:** ![umafm13](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@umafm13](https://forums.percona.com/u/umafm13)\
**Post date:** [November 22, 2006, 3:55pm UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124/3 "2006-11-22T15:55:26Z")

</div>

Thanks for your reply.

I have another question. Can you tell me what parameters can I can actually tune on the fly to effect the performance of an OLTP load (just an example) running on MySQL, if I can vary the amount of memory/cpu that is available to MySQL dynamically ? To clarify, I am working on a project with virtualization using Xen hypervisor. Xen has a control domain called dom0 and user defined number of user domains called domUs. So you may know that it is possible to vary the amount of memory and cpu\_weight that is allocated to a particular domU from dom0. So I have a scenario where I have a domU with MySQL running inside, what I want to be able to do is to come up with a MySQL tunning configuration as a function of changing memory/cpu. Think of it as a ‘dynamic control problem’.

I’ll appreciate your reply.

-Umar

---

<div class="post-metadata">

**Author:** ![umafm13](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@umafm13](https://forums.percona.com/u/umafm13)\
**Post date:** [November 24, 2006, 10:58am UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124/4 "2006-11-24T10:58:01Z")

</div>

Thanks, that’s what I was looking for. )

Peter, can you please comment on my second question:

> > Can you please tell me what kind of characteristics the data and indexes created on that data should be for MyISAM table such that we can actually see the effects of varying key\_buffer\_size ? What I am thinking is a single large MyISAM table with may be an index created on a field containing strings ?

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [November 30, 2006, 6:48pm UTC](https://forums.percona.com/t/changing-innodb-buffer-pool-size-dynamically/124/5 "2006-11-30T18:48:59Z")

</div>

Right. It could be any index - it should just be large enough to need large key\_buffer and you need queries which touch large enough portion of that index to see performance improvement.
