NewGeek
NewGeek

Reputation: 21

MYSQL storage increasing unexpectedly (RDS)

I am total newbie to database game. & I am using mysql 8.0 RDS 20GB free tier.

I don't have much data on it.(just 300 Mb) (wordpress running on ec2 is linked with this rds)

But I always get a mail that you have exceeded 85% of storage limit.(approx 17Gb)

Also Under monitoring tab in rds panel it shows:- Free Storage Space (MB) = 19.330Gb (Constantly without any drop)

I have turned off : general log, slow logs, binlog,

i have done these parameter changes:

binlog_expire_logs_seconds = 86400
general_log = 0
innodb_autoextend_increment = 1
innodb_buffer_pool_size = 5000000000
log_bin_trust_function_creators = 0
log_output = NONE
max_binlog_cache_size = 5368709120
max_connections = 1000
slow_query_log = 0
innodb_file_per_table = 1

SELECT name, count FROM information_schema.innodb_metrics ORDER BY count;

Highest counts seen on:
buffer_data_written = 6936939008
buffer_pool_size = 402653184
os_log_bytes_written = 313484800
buffer_pool_bytes_data = 204668928

Can someone please help me whats consuming these storage. Is this something to do with INNODB?

Upvotes: 2

Views: 635

Answers (1)

Rick James
Rick James

Reputation: 142560

Ouch! innodb_buffer_pool_size = 5000000000 inside 1GB of RAM! This leads to swapping, which uses disk space and slows down MySQL terribly.

Don't set that about, say, 250M. Even that may be too high. Do you have other things running in the db.t2.micro?

max_connections = 1000 -- also too high. Set it to 20

If you want to change anything else, get some advice first. The general advice is: 1gb of RAM is very limited; raising tunables can lead to bad results.

Upvotes: 2

Related Questions