New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Is it possible to run MariaDB with InnoDB on a 512MB VPS?
Howdy,
Is it possible to run a small database using the InnoDB engine off a 512MB VPS without using a ton of swap? I have my mail server set up with Roundcube, dovecot, postfix, clamav and spamassassin and if I leave my.cnf at the default values, it eats about 250MB of RAM and about 300MB of swap. I want to see if I could get the swap usage down, but I am not quite sure what settings I need to tweak to do that.
I did start messing around with the buffer sizes and number of connections allowed, but that mostly resulting it problems with the mail server being unable to access the database if there were a lot of mail coming in.
Thanks for any help,
Charles
Comments
I'm using mariadb with innodb with 256mb ram
free -m gives me 81mb ram and 91mb swap
Then again, I'm not stressing it.
Did you do any tweaking as far as how much memory innodb uses for buffers? As far as I can tell, that is where the majority of the memory usage has been coming from being the configuration is still set to the default:
max_connections = 100
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M
thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
I didn't find any files related to small-my.cnf that I have seen referenced around the internet, so I don't really have anything to base the settings on. Any hints?
Not really.
innodb_log_file_size = 50M
innodb_buffer_pool_size = 8M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
I also use it + webmin in a non-live environment (a couple of dynamic site hosting but not in production state) with 256MB, having about 90MB free memory
Thanks, I'll give it a shot.
Yes. If you have fast I/O, turn off the query cache if memory gets tight.
yes
This site will be helpful http://www.mysqlcalculator.com/
As it currently is, you have an abnormally high max_connections for a 512 vps and heafty sort buffer. That and innodb buffer pool is way too large.
Start with tuning sort_buffer size and connections, and then set the innodb buffer pool to use up the remaining memory. Be sure to leave some for starting system processes and other administrative tasks like mysqldump.
Thanks for the link. I'll check it out.