mysqltuner | MySQL Tuner for Windows
kandi X-RAY | mysqltuner Summary
kandi X-RAY | mysqltuner Summary
The High Performance MySQL Tuning Script is now available on Windows!. Easily view how your MySQL server can be optimised in a clear, easy to read dialog.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mysqltuner
mysqltuner Key Features
mysqltuner Examples and Code Snippets
Community Discussions
Trending Discussions on mysqltuner
QUESTION
I have a database server that runs on 128GB of RAM, 500GB HDD and 10core processor.
I have installed mysqltuner and adjusted all variables as suggested but the MySQL performance improves for only a few hours and then goes back to sluggish performance.
According to mytop
, i have about 8 slow queries which I doubt can be the cause of this.
Note that this server has only MySQL running.
How best can i further improve/optimize MySQL perfomance. Below is a snippet of mysql.conf file.
...ANSWER
Answered 2021-Dec-17 at 18:17You can't tune your way out of most performance problems. Identify the "slow" queries, present them here, together with SHOW CREATE TABLE
and EXPLAIN
.
The slowlog is a good way to discover which are 'worst'. http://mysql.rjweb.org/doc.php/mysql_analysis#slow_queries_and_slowlog
Meanwhile, what version are you using? What ENGINE are you using for the tables? (Hopefully InnoDB for all of your tables.)
Since you have 128GB of RAM, 4G for the buffer pool is much too small; change:
QUESTION
I'm currently using MariaDB version 10.5.12 and the mariadb-connector-nodejs package to interact with it from NodeJS
The pool is created as such
...ANSWER
Answered 2021-Oct-12 at 21:09top indicates there is NO Swap space available.
Consider enabling 6G of swap space to survive busy situations with minimal delay and a surviving system.
Please share the code generally used to Connect, Process, Close connections. Your threads_connected count indicates the Close is being missed and has left 83 threads connected in 10 days.
Suggestions to consider for your my.cnf [mysqld] section,
QUESTION
Wondering if anyone can offer some fresh perspective on some performance issues we're experiencing with a Woocommerce web site.
The site is a single application and database sat on a Digital Ocean droplet - the box is spec'd as 16 cores / 32 GB RAM / 200GB disk.
Over recent months we've seen some sporadic performance on the server actions undertaken:
- MySQLTuner.pl installed and made suggested changes to the MySQL configuration
- MySQL slow logging enabled
- Index applied to queries identified in slow query log
Performance settled down however a few months further on we are beginning to experience spikes in performance again at busy times (circa 300 unique visitors per hour) with the server CPU sat at 100% and the server becoming unresponsive - this can last a couple of minutes currently.
Over recent days we've implemented:
- Cloudflare to proxy all traffic
- All speed optimisations have been applied
- Automatic Platform Optimization for Wordpress installed and up and running
- Query Monitor installed
- Query Monitor identified only 1 slow query with a 0.8sec execution
- Increased WP memory limit from 40MB to 256MB
Looking back through the the MySQL slow log I can see the query below, using the EXPLAIN syntax it looks like all tables are indexed however due to the way its compiled I’m not sure it can be optimised further or in fact where to trace back the query is being ran from - this doesn’t appear in Query Monitor slow logs.
...ANSWER
Answered 2021-Oct-07 at 16:18Thanks for providing the slowlog summary.
This plugin will help with many postmeta usages: https://wordpress.org/plugins/index-wp-mysql-for-speed/
To dig further, let me start by reformatting the query:
QUESTION
and I appreciate in advance for your help on this. I have a VPS with the following specs:
OS: Centos 7.x CPU Model: Common KVM processor CPU Details: 6 Core(2200 MHz) Distro Name: CentOS Linux release 7.9.2009 (Core) Kernel Version: 3.10.0-1160.25.1.el7.x86_64 Database: Server type: MariaDB Server version: 10.2.38-MariaDB - MariaDB Server
And here is mu sqltuner output from letting it run after 48 hours and uptime.
...ANSWER
Answered 2021-May-24 at 18:37Rules for memory allocation.
- Do not allocate so much RAM that swapping will occur. Swapping is terrible for MySQL/MariaDB performance.
- Do adjust
innodb_buffer_pool_size
such that most of RAM is in use during normal time and even for spikes in activity. (I often say "set it to 70% of available RAM", but you are asking for more details.) - Do not bother changing other settings; they add to the complexity of "getting it right".
There are 3 situations (based on innodb_buffer_pool_size and dataset size):
- Tiny dataset -- buffer_pool is bigger than necessary --> wasting some of RAM, but so what; it is not useful for anything else. And it give you some room for growth.
- Medium-sized dataset -- Most activity is done in RAM; the system will run nicely.
- Big dataset -- The system may be I/O-bound. Adding RAM is a costly and brute force solution. However, some software techniques (eg, better indexes) may help, such as this for WordPress and WooCommerce.
QUESTION
Normally I can find the answer to my problem without posting but I have looked at a few dozen posts regarding the same error message- most of them suggest installing php-mysql or php7.3-mysql or uncommenting the pdo extension in php.ini. I have tried all of these without any success. I suspect this must be some type of configuration error. The older methods of connecting to MySQL in php work just fine. The PDO driver is just not working.
There are no errors in the respectable nginx log, syslog, nor php7.3-fpm's log.
Frustrated and out of ideas, earlier today I tried upgrading to Debian bullseye assuming there may be some package incompatibility but that did not seem to help either. This took my php version to 7.4 (which seems to be working just fine everywhere else on the server)
Is there some way to find out more information as to why? Or a more detailed error log (cannot find any other than what I see in browser). I'm at a complete dead end right now.
Some info:
...ANSWER
Answered 2021-Apr-02 at 02:46If you just grabbed a copy of ttrss recently, it looks like Fox changed how the variables were being accessed in the configuration. Instead of using defined variables, it's now using environmental variables. For example
QUESTION
We recently upgraded from mysql 5.6 to mysql 8.0 on a few servers, one of the servers was fine, and has had no problems, but it has significantly less load than one of our other servers which has been running out of memory.
Our server launches, then grabs 300 connections, and keeps them open with a C3P0 pool to the mysql server.
We were running these servers on AWS on MySQL 5.6 with the same overridden parameters on 8GB of RAM, when we upgraded to MySQL 8.0.21 we started running out of RAM in about 1 day. We grew the server to 32Gb but didn't change the parameters. It's gone over 15 GB used and still going up.
We're pretty sure it's related to the per connection thread memory, but not sure why. From looking at MySQL tuner it looks like the variables that control per thread memory are:
...ANSWER
Answered 2021-Jan-18 at 19:41You're calculating the per-thread memory usage wrong. Those variables (and tmp_table_size
which you didn't include) are not all used at the same time. Don't add them up. And even if you were to add them up, at least two might be allocated multiple times for a single query, so you can't just sum them anyway.
Basically, the memory usage calculated by MySQLTuner is totally misleading, and you shouldn't believe it. I have written about this before: What does "MySQL's maximum memory usage is dangerously high" mean by mysqltuner?
If you want to understand actual memory usage, use the PERFORMANCE_SCHEMA, or the slightly easier to read views on it, in the SYS schema.
The documentation for PS or SYS is pretty dense, so instead I'd look for better examples in blogs like this one:
https://www.percona.com/blog/2020/11/02/understanding-mysql-memory-usage-with-performance-schema/
QUESTION
I have a PHP application that is running on a LAMP stack. This application makes an API call back to the server via javascript to get more data to display on the screen every second. When there are a number of users using it at the same time, say 80, mySQL slams the CPU to 100% until the application is finished.
What am I using:
- mySQL 5.7.31
- Ubuntu 18.04
Running on an EC2 instance of size m5.xlarge
- 4 vCPU
- 16G RAM
- network BW up to 10Gbps
I used advice from percona about tweaking the mySQL parameters, they say most of 5.7's have great defaults expect a couple that are dependent on your hardware, so my mySQL config looks like this
mysqld.cnf
...ANSWER
Answered 2020-Oct-28 at 09:30Forget mysql tuner - it will likely do you more harm than good unless you already know what you are doing.
For the first two queries in your QAN screenshot, you need an index on stored_path_data(stored_path_ID, tick)
. That should make a huge amount of difference to the performance and CPU consumption.
QUESTION
I have an old django 1.9 application connected to a mysql 5.7 database. Sometime I get this error:
...ANSWER
Answered 2020-Mar-25 at 12:07I noticed you SET Open Files handles in ubuntu to 1024 when you ran ulimit -n 1024. Your system needs many more available Open File handles to support your 4650 innodb tables. Suggestion ulimit -n 24000 and then check settings with ulimit -a (to list current limits). I am looking forward to analyzing your data next week from production instance.
Suggestion for your ulimit -a to consider please
ulimit -n 24000 # from 1024 to enable more OS file handles to be active.
The above is dynamic with Linux OS. Stop/Start services would have access to the handles. To make this persistent across OS shutdown/restart, review this url for similar OS instructions. These instructions set 500000 for the file-max, please set your capacity at 24000 for now. ulimit please set to 24000, which will allow MySQL to use requested limits and have spares for other apps
https://glassonionblog.wordpress.com/2013/01/27/increase-ulimit-and-file-descriptors-limit/
QUESTION
I have an InnoDB database table with about 160,000 records and a simple UPDATE query like:
UPDATE table SET field='12345' WHERE order_number=102192817
is taking a long time (over half a second) to update:
# Query_time: 0.609242 Lock_time: 0.000118 Rows_sent: 0 Rows_examined: 165359
The problem I have is these updates are running about every 2-3 seconds and it's causing the overall performance of the server to slow down.
The server has 8GB memory and 4.5GB of that is allocated to mySQL with mysqltuner showing everything quite ok (in terms of settings).
Would creating an INDEX on order_number
help in this case?
ANSWER
Answered 2020-Feb-01 at 12:21you can increse query speed by indexing 'order_number' field.
if 'order_number' is unique, use unique index.
if ypu want only update one row, add "LIMIT 1".
QUESTION
Here are my mysqltuner results:
...ANSWER
Answered 2020-Jan-30 at 05:48Set innodb_buffer_pool_size
to about 70% of available RAM. The 4.4G suggested by mysqltuner will handle all your current data. If you expect it to grow, then give it more. This setting will probably help with I/O (not CPU).
(Actually "InnoDB Read buffer efficiency: 95.00% (920105182 hits/ 968548737 total)" says that the paultry 128M buffer_pool seems to handle the "working set" adequately.)
You cannot tune for "optimize for better CPU usage". You can find the slow queries and work on indexing (especially 'composite' indexes) and query formulation. Those will help with CPU.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mysqltuner
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page