MySQL consuming a lot of CPU


Hello, I’m having trouble with a new server I installed the Optimized configuration for Ubuntu server with EasyEngine of VirtuBox

when migrating my website with template newspaper. the cpu consumption is very high,

follow the prints

nginx local

mysql query


  • Redis Object Cache Drop-In v1.3.8 by Till Krüss Plugins:
  • Advanced Custom Fields PRO v5.6.6 by Elliot Condon (Active)
  • Custom fields display v1.1 by Shambhu Prasad Patnaik (Inactive)
  • Duplicate Post v3.2.2 by Enrico Battocchi (Inactive)
  • Export media with selected content v1.0 by Joost de Keijzer (Inactive)
  • Facebook Instant Articles & Google AMP Pages by PageFrog v1.0.9 by PageFrog Team (Inactive)
  • Fast Velocity Minify v2.3.4 by Raul Peixoto (Inactive)
  • Google Analytics Dashboard for WP (GADWP) v5.3.5 by ExactMetrics (Active)
  • Google News Editors Picks Feed Generator v2.0 by Peoples_Pundit (Inactive)
  • Google News Sitemap v1.0.11 by Andrea Pernici (Active)
  • Inline Related Posts v2.2.0 by IntellyWP (Active)
  • Insert Post Ads v1.0.6 by WPBeginner (Inactive)
  • Mashshare Share Buttons v3.4.4 by René Hermenau (Inactive)
  • Nginx Helper v1.9.11 by rtCamp (Active)
  • Octolooks Scrapes v1.4.3 by Octolooks (Inactive)
  • OneSignal Push Notifications v1.16.7 by OneSignal (Active)
  • Page Visit Counter v4.0.4 by Multidots (Inactive)
  • Redis Object Cache v1.3.8 by Till Krüss (Active)
  • Smush v2.8.0.1 by WPMU DEV (Active)
  • SSL Insecure Content Fixer v2.7.0 by WebAware (Inactive)
  • tagDiv AMP v1.1 by tagDiv (Active)
  • tagDiv Composer v2.1 by tagDiv (Active)
  • tagDiv Mobile Theme v1.1 by tagDiv (Inactive)
  • tagDiv Multi-Purpose v2.0 by tagDiv (Active)
  • tagDiv Newsletter v1.0 by tagDiv (Active)
  • tagDiv Social Counter v4.2 by tagDiv (Active)
  • tagDiv Speed Booster v4.9.1 by tagDiv (Active)
  • WordPress Importer v0.6.4 by wordpressdotorg (Active)
  • WP-Polls v2.73.7 by Lester ‘GaMerZ’ Chan (Inactive)
  • WP Awesome Import & Export v2.6.1 by ddeveloper (Inactive)
  • WPBakery Page Builder v5.4.5 by Michael M - (Active)
  • WP Easy Gallery v4.2.1 by HahnCreativeGroup (Inactive)
  • WP Remove Category Base v1.0 by Ezra Verheijen (Active)
  • WP Responsive Menu v3.0.3 by MagniGenie (Inactive)
  • Yoast SEO v7.3 by Team Yoast (Active)

MySQLTuner 1.7.12 - Major Hayden Bug reports, feature requests, and downloads at Run with ‘–help’ for additional options and output filtering

[–] Skipped version check for MySQLTuner script [OK] Logged in using credentials from Debian maintenance account. [OK] Currently running supported MySQL version 10.3.9-MariaDB-1:10.3.9+maria~xenial [OK] Operating on 64-bit architecture

-------- Log file Recommendations ------------------------------------------------------------------ [–] Log file: /var/lib/mysql/condor2495.err(0B) [!!] Log file /var/lib/mysql/condor2495.err doesn’t exist [!!] Log file /var/lib/mysql/condor2495.err isn’t readable.

-------- Storage Engine Statistics ----------------------------------------------------------------- [–] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE [–] Data in MyISAM tables: 746.6K (Tables: 38) [–] Data in InnoDB tables: 6.7G (Tables: 152) [OK] Total fragmented tables: 0

-------- Analysis Performance Metrics -------------------------------------------------------------- [–] innodb_stats_on_metadata: OFF [OK] No stat updates during querying INFORMATION_SCHEMA.

-------- Security Recommendations ------------------------------------------------------------------ [OK] There are no anonymous accounts for any database users [OK] All database users have passwords assigned [!!] User ‘cenarigtA7cK1MBf@%’ does not specify hostname restrictions. [!!] User ‘root@%’ does not specify hostname restrictions. [–] There are 605 basic passwords in the list.

-------- CVE Security Recommendations -------------------------------------------------------------- [–] Skipped due to --cvefile option undefined

-------- Performance Metrics ----------------------------------------------------------------------- [–] Up for: 51m 13s (910K q [296.209 qps], 12K conn, TX: 15G, RX: 220M) [–] Reads / Writes: 99% / 1% [–] Binary logging is disabled [–] Physical Memory : 31.3G [–] Max MySQL memory : 15.8G [–] Other process memory: 8.0G [–] Total buffers: 12.9G global + 7.5M per thread (400 max threads) [–] P_S Max memory usage: 0B [–] Galera GCache Max memory usage: 0B [OK] Maximum reached memory usage: 13.5G (43.06% of installed RAM) [OK] Maximum possible memory usage: 15.8G (50.54% of installed RAM) [OK] Overall possible memory usage with other process is compatible with memory available [OK] Slow queries: 0% (0/910K) [OK] Highest usage of available connections: 20% (82/400) [OK] Aborted connections: 0.11% (13/12098) [!!] 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. [OK] Query cache efficiency: 42.6% (627K cached / 1M selects) [!!] Query cache prunes per day: 605699 [OK] Sorts requiring temporary tables: 1% (1K temp sorts / 116K sorts) [OK] No joins without indexes [!!] Temporary tables created on disk: 32% (27K on disk / 82K total) [OK] Thread cache hit rate: 99% (82 created / 12K connections) [OK] Table cache hit rate: 98% (443 open / 449 opened) [OK] Open file limit used: 0% (129/500K) [OK] Table locks acquired immediately: 100% (627 immediate / 627 locks)

-------- Performance schema ------------------------------------------------------------------------ [–] Performance schema is disabled. [–] Memory used by P_S: 0B [–] Sys schema isn’t installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------ [–] ThreadPool stat is enabled. [–] Thread Pool Size: 8 thread(s). [–] Using default value is good enough for your version (10.3.9-MariaDB-1:10.3.9+maria~xenial)

-------- MyISAM Metrics ---------------------------------------------------------------------------- [!!] Key buffer used: 18.2% (24M used / 134M cache) [OK] Key buffer size / total MyISAM indexes: 128.0M/551.0K [!!] Read Key buffer hit rate: 80.0% (10 cached / 2 reads)

-------- InnoDB Metrics ---------------------------------------------------------------------------- [–] InnoDB is enabled. [–] InnoDB Thread Concurrency: 0 [OK] InnoDB File per table is activated [OK] InnoDB buffer pool / data size: 12.0G/6.7G [!!] Ratio InnoDB log file size / InnoDB Buffer pool size (16.6666666666667 %): 1.0G * 2/12.0G should be equal 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% (14740722054 hits/ 14741019439 total) [!!] InnoDB Write Log efficiency: 54.18% (5539 hits/ 10224 total) [OK] InnoDB log waits: 0.00% (0 waits / 4685 writes)

-------- AriaDB Metrics ---------------------------------------------------------------------------- [–] AriaDB is enabled. [OK] Aria pagecache size / total Aria indexes: 128.0M/1B [OK] Aria pagecache hit rate: 95.7% (268K cached / 11K reads)

-------- 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: MIXED [–] XA support enabled: ON [–] Semi synchronous replication Master: OFF [–] Semi synchronous replication Slave: OFF [–] This is a standalone server

-------- Recommendations --------------------------------------------------------------------------- General recommendations: Restrict Host for user@% to user@SpecificDNSorIp MySQL was started within the last 24 hours - recommendations may be inaccurate Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1 When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries which have no LIMIT clause Performance schema should be activated for better diagnostics Consider installing Sys schema from Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: Variables to adjust: query_cache_size (=0) query_cache_type (=0) query_cache_size (> 64M) tmp_table_size (> 64M) max_heap_table_size (> 64M) performance_schema = ON enable PFS innodb_log_file_size should be (=1G) if possible, so InnoDB total log files size equals to 25% of buffer pool size.