What gets freed up in SingleStore memory after a reboot?

Here is a picture of before and after a reboot. Besides rowstore tables being stored in memory. Can anyone explain what got flushed out after a reboot? (Temp tables…)

Hi Alau. Great question!

When a node restarts, the in-memory plancache starts off empty and plans are loaded back in from on-disk plancache as queries run.

There are other variables like buffer_manager_cached_memory that keeps track of cached memory that is cleared during reboot.

You can run the command SHOW STATUS EXTENDED on your instance to see a detailed breakdown of memory usage.

Here is a good page for identifying and reducing memory usage for more details.

Hope this is helpful! :dizzy:

1 Like

Do these items get cleared out without doing a reboot? Also can this be cleared our manually?

They are caches, with different eviction policies. Some of them have knobs to tune those policies or trigger full flushes of the caches ( plan_expiration_minutes is a knob to control the size of the in-memory plancache). For the most part, if SingleStoreDB’s memory use is under the maximum_memory setting then it will aggressively cache frequently accessed objects (plans, data, buffered memory for use by query execution, etc.). When memory available drops, most of the caches automatically shrink themselves.

-Adam

2 Likes

In addition, here’s some more info that may be helpful for you to check out.

There are plan cache expiration limits which can be found in this page.The in-memory plancache is always enabled and the default plan expiration is 720 minutes.

It’s also possible to see the plans in the plancache with this command:

show plancache;

To drop all plans in the plancache you may use this command:

drop all from plancache

To drop a specific plan from the plancache, find the PlanId number (example: 10) and run this command:

drop from plancache;

Please keep us posted on the results. All the best. :dizzy: