Health Warning: the suggestion is made on the basis of zero knowledge of the underlying methodology so may simply not be possible. In these days of virtual servers, where RAM can be added dynamically, is it feasible to make the database engine cache settings something that could be modified for a running server process? In the good old days it wasn't an issue, you had to dismantle the server to add the RAM, but now everyone gets frightfully excited if you want to stop a server for five minutes. |
It's likely possible to implement but it is certainly not supported currently. So my thought that the engine would notice additional physical RAM during its checks for cache resizing is wrong? (Aside: I'm aware that Justin and me have asked for somewhat different requirements - explicitly changing the cache settings vs. adapting the cache to changed physical RAM...)
(12 Jun '14, 11:21)
Volker Barth
Replies hidden
@Volker I'm thinking of the dedicated server where one has explicitly set the cache eg -c 8G -ca 0 if one always used a percentage setting instead of absolute, I wonder what would happen when the RAM changes, but I'll bet it will be decided on start up.
(12 Jun '14, 11:36)
Justin Willey
...whereas I was thinking of what will happen when -ca is not used and -ch is not specified...?
(12 Jun '14, 11:42)
Volker Barth
3
The engine will notice the new RAM but the cache size will still be limited to whatever -ch value was specified (or chosen by default) at startup. So, if you have an 8GB machine and you start a server with -c 4g -ch 128g, you might find that the server will take advantage of more memory if it becomes available (I make no promises :)). However, you might also find that a large query may grow the cache beyond 8GB if you haven't added new memory yet (and you'll do a LOT of very slow memory swapping). In any case, the cache wouldn't grow beyond 128GB if you changed the VM to have, say, 256GB of memory.
(12 Jun '14, 12:05)
John Smirnios
What happens when you specify something like -ch 75p? ( where p means percentage, not "pages" like I once thought :)
(13 Jun '14, 14:35)
Breck Carter
1
The 'p' notation is transformed in a fixed number at startup based on the physical memory and address space available at that time. If we supported the dynamic addition of physical memory, I suppose one might want the 'p' to be reinterpreted after memory is added.
(19 Jun '14, 14:06)
John Smirnios
|
Are you sure the database engine does not already do that? - I share your "health warning", however, the dynamic cache sizing seems to check the available physical memory in short frequences, and I can imagine this might include "freshly added RAM", too...
Whether the maximum cache size via dbsrvX -ch might be adapted dynamically, is another question, apparently...