How do I make a MySQL database run completely in memory?

Hugo E.

Member
Registered
Joined
Sep 8, 2014
Messages
62
Points
0
I have noticed that my MySQL server is the top reason for high load on my VPS. I want to make a database running with CPUs and instead that to run completely in memory for better performance.
How do I do that? I explored PHPMyAdmin, is there a way to change there or what addons or software do I need to install for running Mysql with memory?
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
That will not fix your CPU problem, data will be cached in memory instead of disk when switching to the MySQL memory engine for faster access but the queries will be executed by the CPU just as before, just could see a small improvement in cpu usage but the negatives points of keeping data in memory which is far more vulnerable when compared to disk storage could cause big problems in the server crashed or had hardware memory problems.
 

sh-admin

Active member
Registered
Joined
Sep 29, 2016
Messages
66
Points
0
The solution for the issue is to check the slow mysql queries ... check the status of the mysql queries and operations .. find out the slow queries .. optimize the database as per your VPS configuration and that should fix the issues. Switching database running with CPU will affect other services running so there is no point to bug the CPU.
 

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
I suggest you use a caching solution like redis or memcached to store your data. It will decrease loadings and queries for your databases

In other words, you can follow tips from sh-admin and LJSHost to check your database problems if they are getting slow queries. Many website CMS and software on your VPS can get these and you need to fix them via log files.
 

UWH-David

Member
Registered
Joined
Jan 18, 2016
Messages
45
Points
8
mySQL/MariaDB actually does use RAM by default. Use Perl mySQL tuner and optimize your configuration, it makes a tremendous difference. Even better, also use memcached/PHP opcache to lower the load of your applications from hitting it excessively.
 
Older Threads
Replies
4
Views
3,595
fwh
Replies
24
Views
23,786
Replies
7
Views
4,409
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top