Reputation: 12465
I have a MemSQL server which has approximately 1 MB data in all the tables in it. Which also uses very low acceptable memory usage. But the problem is the server has recently run out of disk space. When look in more details I could find the following disk space usage.
52G /var/lib/memsql/master-3306/plancache/
34G /var/lib/memsql/leaf-3307/plancache/
which contains many files like below
Select_digin_componentheader_72f4f4454iusudf9sdf98tkjnm432436thss4dgfdhjfd45tr44.cc Select_digin_componentheader_72f4f4454iusudf9sdf98tkjnm432436thss4dgfdhjfd45tr44.ok Select_digin_componentheader_72f4f4454iusudf9sdf98tkjnm432436thss4dgfdhjfd45tr44.so
Where digin_componentheader is one of our table names and the files as above exists for other tables as well. We do many insertions but also we delete them after 5 mins thats the only operation we have been doing for 6 months.
We have not changed any configuration and it has all the default configurations in memsql server. Can anybody explain why it needs 90GB to store this? OR is it any configuration issue?
Upvotes: 0
Views: 1012
Reputation: 739
MemSQL won't delete the files in the plancache on its own. They're required to run queries. Old\stale files can accumulate over time for queries you may no longer be running (or after ALTER table operations). You can delete the contents of the plancache directory when the server is stopped (don't do it when MemSQL is running). MemSQL will rebuild any files it needs the first time a query is run after you restart it. Be aware, this will make the first execution of your queries after restart slower (code-generation cost - this is much faster in MemSQL 5).
Upvotes: 2
Reputation: 129
This is generated and compiled code that MemSQL creates for every query. Based on the content of the plancache dir you are running MemSQL 4. I recommend upgrading to MemSQL 5 which does not use g++ to compile queries.
Upvotes: 2