a year ago
My current cost for using using two mysql dbs comes out to be around 5$. They both use around 250-300 MB ram constantly. 90% cost I'm paying for ram approx.
#1 What is using ram?
#2 If it is db table data for example, how can I convert this data to disk?
If i'm completely off the spectrum while asking these questions, the core thing I'm trying to figure out is that - DBs are not supposed to have all the data in active ram. There is a filesystem and storage. Using ram will up the hosting costs, and reducing that will require not using RAM for holding the data (if the ram is being used that way).
2 Replies
a year ago
Hey!
1. Your MySQL application is using memory
Table data is stored in disk
I'm no expert on MySQL but I know MySQL is simply a very memory-hungry service to run. A lot of it is memory allocation for cache and buffers that helps improve the performance and efficiency of the application (You can read more about how MySQL uses memory, here)
Your data is stored in disk under the attached Volume on your MySQL service, although some data may be cached in memory to improve speed. If memory usage is a big issue for you then I'd recommend using MariaDB instead, it's a drop-in replacement for MySQL and is less costly to run.
dev
Hey!1. Your MySQL application is using memoryTable data is stored in diskI'm no expert on MySQL but I know MySQL is simply a very memory-hungry service to run. A lot of it is memory allocation for cache and buffers that helps improve the performance and efficiency of the application (You can read more about how MySQL uses memory, here)Your data is stored in disk under the attached Volume on your MySQL service, although some data may be cached in memory to improve speed. If memory usage is a big issue for you then I'd recommend using MariaDB instead, it's a drop-in replacement for MySQL and is less costly to run.
a year ago
I appreciate the reply, it makes sense. MariaDB seems better, or poking around with mysql config will work as well given my needs. It will bring the idle memory down by atleast 40%.
I'll post mysql configs after I find them and run a couple of iterations, if they are helpful for users who don't have full throttle needs.
Status changed to Solved dev • over 1 year ago