Skip to content

Error en mi MySQL #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxicabanillas78 opened this issue Apr 22, 2019 · 1 comment
Closed

Error en mi MySQL #437

maxicabanillas78 opened this issue Apr 22, 2019 · 1 comment

Comments

@maxicabanillas78
Copy link

maxicabanillas78 commented Apr 22, 2019

hola no hablo ingles necesito ayuda para mejorar my sistema esta consumiendo casi toda la memoria Ram
me poderia ayudar configurar my.cnf
16GB RAM

hello I do not speak English I need help to improve my system this consuming almost all the Ram memory
I could help configure my.cnf
16GB RAM

[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 11m 29s (675K q [980.157 qps], 9K conn, TX: 144M, RX: 68M)
[--] Reads / Writes: 74% / 26%
[--] Binary logging is disabled
[--] Physical Memory : 15.7G
[--] Max MySQL memory : 23.4G
[--] Other process memory: 0B
[--] Total buffers: 15.0G global + 17.2M per thread (500 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[!!] Maximum reached memory usage: 15.3G (97.19% of installed RAM)
[!!] Maximum possible memory usage: 23.4G (149.21% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (0/675K)
[OK] Highest usage of available connections: 3% (15/500)
[OK] Aborted connections: 0.00% (0/9481)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[!!] Query cache may be disabled by default due to mutex contention.
[!!] Query cache efficiency: 0.0% (0 cached / 323K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (15 temp sorts / 5K sorts)
[!!] Joins performed without indexes: 46
[!!] Temporary tables created on disk: 82% (6K on disk / 7K total)
[OK] Thread cache hit rate: 99% (15 created / 9K connections)
[OK] Table cache hit rate: 46% (6K open / 13K opened)
[OK] Open file limit used: 5% (5K/100K)
[OK] Table locks acquired immediately: 99% (20K immediate / 20K locks)

-------- Performance schema ------------------------------------------------------------------------
[--] Memory used by P_S: 72B
[--] Sys schema is installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.

-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.7% (372M used / 1B cache)
[OK] Key buffer size / total MyISAM indexes: 1.9G/1.4G
[!!] Read Key buffer hit rate: 93.2% (109K cached / 7K reads)
[OK] Write Key buffer hit rate: 100.0% (35K cached / 35K writes)

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 16
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 12.0G/10.8G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (4.16666666666667 %): 256.0M * 2/12.0G should be equal to 25%
[OK] InnoDB buffer pool instances: 12
[--] Number of InnoDB Buffer Pool Chunk : 96 for 12 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 100.00% (369673840 hits/ 369680892 total)
[!!] InnoDB Write Log efficiency: 6.16% (6087 hits/ 98884 total)
[OK] InnoDB log waits: 0.00% (0 waits / 92797 writes)

-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is disabled.

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Control warning line(s) into /var/log/mysql/error.log file
Control error line(s) into /var/log/mysql/error.log file
Restrict Host for user@% to user@SpecificDNSorIp
MySQL was started within the last 24 hours - recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Dedicate this server to your database for highest performance.
Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
Adjust your join queries to always utilize indexes
Temporary table size is already large - reduce result set size
Reduce your SELECT DISTINCT queries without LIMIT clauses
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (=0)
query_cache_type (=0)
query_cache_limit (> 512K, or use smaller result sets)
join_buffer_size (> 1.0M, or always use indexes with JOINs)
innodb_log_file_size should be (=1G) if possible, so InnoDB total log files size equals to 25% of buffer pool size.


[mysqld]
sql_mode = "0"
max_connections = 500
max_user_connections = 100
key_buffer_size = 1900M

myisam_sort_buffer_size = 128M #index buffer size for creating/altering indexes
myisam_max_sort_file_size = 256M #max file size for tmp table when creating/alering indexes

log_slave_updates = 1
read_buffer_size = 4M
read_rnd_buffer_size = 8M
sort_buffer_size = 4M
relay_log_info_repository = TABLE
relay_log_recovery = 1
binlog_cache_size = 64K
join_buffer_size = 1M

innodb_write_io_threads = 16
innodb_read_io_threads = 16

innodb_buffer_pool_size = 12GB
innodb_buffer_pool_instances = 12
innodb_log_file_size = 256M
innodb_log_buffer_size = 128M
innodb_lock_wait_timeout = 300
innodb_thread_concurrency = 16
innodb_commit_concurrency = 16
innodb_flush_log_at_trx_commit=1# may change to 2 or 0
innodb_flush_method=O_DIRECT

query_cache_type = 0
query_cache_limit = 512K
query_cache_min_res_unit = 4k
query_cache_size = 32M

long_query_time = 5
table_open_cache = 9600
open_files_limit = 19000
slow_query_log = ON

max_heap_table_size = 1G #recommend same size as tmp_table_size
bulk_insert_buffer_size = 1G #recommend same size as tmp_table_size
tmp_table_size = 1G #recommend 1G min

@jmrenouard
Copy link
Collaborator

Hi,
Issue are not a base to push result and get all recommandations for your settings.

As explained,
WARNING
It is extremely important for you to fully understand each change you make to a MySQL database server. If you don't understand portions of the script's output, or if you don't understand the recommendations, you should consult a knowledgeable DBA or system administrator that you trust. Always test your changes on staging environments, and always keep in mind that improvements in one area can negatively affect MySQL in other areas.

It's also important to wait at least a day of uptime to get accurate results. In fact, running mysqltuner on a fresh restarted server is completely useless.

Seriously - please review the FAQ section below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants