I want to configure MySQL to use a RAM disk as its data directory for better performance.

MySQL is running in RAM, but Virtualmin and Webmin are not installing applications like WordPress. I’m not very familiar with Virtualmin and I’m not sure exactly where to change the settings.

No where enough detail to even be able to start giving suggestions we don’t know the virtualmin version, the OS version and mysql version which would be the bare minimum to be able to help. What error does the virtualmin script installer throw ?

When you make a post you are asked for basic system information.

That is required so others here can help. Please do not just ignore it and leave us guessing.

modifies already installed virtulamin,

/mnt/ramdisk/mysql/mysql.sock - I lost the database

everything works, only when I upload wordpress - the database does not work from the panel

wp config create failed : Error: Database connection error (2002) No such file or directory

|Webmin version|2.303|
Usermin version|2.203|

|Virtualmin version|7.30.8|

You have
a: gone off the virtualmin install specifications
b: not said what flavor or version of the operating system you are using
c: not given any indication that mysql is running and listening.
Tbf i would revert everything back to a standard mysql instalation, reinstall the app (assuming the install failed) and see if it works. I’m not sure what benefit you may gain from from putting your database(s) on a ram disk. I have a database that is on a native disk with around .5 million records in 4 tables which performs well

I mean speed ,

backend works slowly

frontend works well

system: debian

I’m talking about backend in WordPress

Well as frontend works well, this doing loads of msql queries so that can discount mysql problems, something else is causing your backend to slow down

so a Debian OS - but how big (number of CPU, storage (memory and HD/SSDD/virtual) - how many/much is it having to do - how many VS

frontend is down to the user’s PC and connectivity (most of which is always slower than backend) so what/how are you measuring backend vs frontend?

WP = PHP, what version, what mode, is it all up to date … what versions? still missing that basic detail which was requested when you asked for help! we are just left guessing

(and, I know I have said it before) but nearly all problems with WP are to do with WP, particularly its modules/themes etc - are rarely the backend. WP is used by many (though not by me) they do not all have this problem.

Virtualmin/Webmin do not micromanage where MySQL/Mariadb stores databases. If you’ve configured it to use a RAM disk (which is a terrifyingly dangerous idea and I don’t recommend it), then that’s where your data will go. Virtualmin doesn’t care, it’s not managing the data files directly.

If it doesn’t work, it’s because you haven’t configured MySQL or Mariadb appropriately to use that location for storage.

But, this really is a bad idea. If you have a ton of memory, just let your databases use a bunch of it for caching and buffers. That gives you pretty much all of the benefits of a RAM disk-backed database, without the guaranteed data loss that comes from using a RAM disk exclusively.

1 Like

Writes could be faster on a RAM-backed database, but only because you don’t have guaranteed writes to disk in that case. You can adjust various paging options in the database configuration to allow it to play more fast and loose with guaranteeing data is written to disk before returning to get most of the performance of pure RAM databases.