logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
Blog Post
ResourceSLES, RHEL & Zextras

Tips Improvement Performance MySQL Server Secara Mudah

December 19, 2012by Masim Vavai Sugianto

Setelah proses instalasi, langkah berikutnya untuk melakukan setup MySQL Server yang handal adalah dengan melakukan proses tuning terhadap konfigurasi MySQL. Berikut adalah beberapa hal yang bisa dilakukan untuk meningkatkan kehandalannya

3.1 Check Standar Keamanan

Untuk mengecek kehandalan sistem MySQL Server yang baru diinstall, cukup dengan melakukan perintah :

mysql_secure_installation

Setelah dijalankan, MySQL akan melakukan pengecekan terhadap konifgurasi default. Ikuti petunjuk yang diberikan untuk memperbaiki standar konfigurasi yang ada.

linux:/srv # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current

password for the root user. If you’ve just installed MySQL, and

you haven’t set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] y

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

… Success!

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n]

Setelah selesai dicheck, restart ulang service MySQL.

3.2 Menggunakan Konfigurasi yang Tepat

MySQL secara default menggunakan konfigurasi moderate, dalam arti bahwa konfigurasi yang yang diberikan merupakan konifgurasi yang menyesuaikan dengan sistem server secara umum. Ada penyesuaian antara performa dengan stabilitas. Tidak diset performa tinggi agar tidak mempengaruhi stabilitas sistem.mysql-performance-tuning

Kita bisa dengan mudah melakukan ujicoba tuning sistem dengan cara membackup file konfigurasi standard dan kemudian mengubah beberapa opsi/parameter yang tersedia.

Untuk parameter yang ditune up, tidak perlu dihapalkan satu persatu, karena MySQL sudah menyediakannya pada folder /usr/share/mysql. Pada folder tersebut ada nama file konfigurasi : my-small.cnf, my-medium.cnf, my-large.cnf dan my-huge.cnf.

Salin atau modifikasi file asli /etc/my.cnf yang sudah dibackup dan membandingkannya dengan file konfigurasi yang diinginkan diatas.

3.3 Menggunakan MySQLTuner

Ada juga cara termudah untuk memastikan bahwa MySQL Server yang kita install sudah dikonfigurasi dengan baik, yaitu dengan menggunakan script mysqltuner. Script ini dibuat dengan bahasa Perl dan akan melakukan pengecekan terhadap konfigurasi database MySQL yang kita miliki. Jangan lupa untuk membackup file konfigurasi yang ada sebelum menjalankannya.

Berikut adalah cara menggunakan MySQLTuner :

wget mysqltuner.pl –no-check-certificate

chmod +x mysqltuner.pl

./mysqltuner.pl

Contoh tampilan script saat dijalankan :

# ./mysqltuner.pl

>> MySQLTuner 1.2.0 – Major Hayden <major@mhtx.net>

>> Bug reports, feature requests, and downloads at http://mysqltuner.com/

>> Run with ‘–help’ for additional options and output filtering

Please enter your MySQL administrative login: root

Please enter your MySQL administrative password:

——– General Statistics ————————————————–

[–] Skipped version check for MySQLTuner script

[OK] Currently running supported MySQL version 5.0.95

[OK] Operating on 64-bit architecture

——– Storage Engine Statistics ——————————————-

[–] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster

[!!] InnoDB is enabled but isn’t being used

[OK] Total fragmented tables: 0

——– Security Recommendations ——————————————-

[OK] All database users have passwords assigned

——– Performance Metrics ————————————————-

[–] Up for: 2h 33m 25s (59 q [0.006 qps], 25 conn, TX: 23K, RX: 3K)

[–] Reads / Writes: 86% / 14%

[–] Total buffers: 42.0M global + 1.9M per thread (100 max threads)

[OK] Maximum possible memory usage: 229.5M (11% of installed RAM)

[OK] Slow queries: 0% (0/59)

[OK] Highest usage of available connections: 1% (1/100)

[OK] Key buffer size / total MyISAM indexes: 16.0M/21.0K

[!!] Key buffer hit rate: 66.7% (12 cached / 4 reads)

[!!] Query cache is disabled

[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1 sorts)

[OK] Temporary tables created on disk: 0% (0 on disk / 8 total)

[!!] Thread cache is disabled

[OK] Table cache hit rate: 73% (17 open / 23 opened)

[OK] Open file limit used: 3% (34/1K)

[OK] Table locks acquired immediately: 100% (30 immediate / 30 locks)

[!!] Connections aborted: 8%

——– Recommendations —————————————————–

General recommendations:

Add skip-innodb to MySQL configuration to disable InnoDB

MySQL started within last 24 hours – recommendations may be inaccurate

Enable the slow query log to troubleshoot bad queries

Set thread_cache_size to 4 as a starting value

Your applications are not closing MySQL connections properly

Variables to adjust:

query_cache_size (>= 8M)

thread_cache_size (start at 4)

Beberapa tips diatas bisa dengan mudah dijalankan sehingga MySQL Server yang baru disetup bisa berjalan dengan baik, tidak dibiarkan demikian adanya 🙂

Database MySQL Server
Prev

Layanan Baru Excellent : Remote Install Server & Maintenance Support

Next

Instalasi Driver Printer Canon Pixma 1980 pada LinuxMint 14 "Nadia" 64 bit/Ubuntu 12.10 "Quantal Quetzal" 64 bit

Related Posts

ResourceZimbra
October 23, 2012

Tips Zimbra Mail Server : Memahami Zimbra Proxy & Konsep Multi Server-Bagian 1

Read more
Resource
June 26, 2012

Recovery Data & Mengembalikan Partisi yang Hilang dengan Aplikasi TestDisk-PartedMagic

Read more
Zextras
September 8, 2011

ZeXtras Suite 1.0.0 Release Candidate 3 Released!

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

Search
Recent Post
  • Zimbra Daffodil 10.1.16 Rilis: Modern Web App Makin Cerdas, Backup Lebih Hemat Storage, dan Peningkatan Keamanan
  • Live Migration vs High Availability di XCP-ng: Perbedaan dan Skenario Penggunaan
  • Informasi untuk Pelanggan PT. Excellent Infotama Kreasindo : Penyesuaian Kebijakan Masa Berlaku Sertifikat SSL/TLS Menuju Standar Keamanan Global
  • Excellent Infotama Kreasindo: Lingkungan Kerja yang Memberi Ruang untuk Bertumbuh
  • Segudang Benefit dari Dana Buffer: Ketika Kebijakan Berangkat dari Pengalaman
Categories
Archives
Featured image: Tips Improvement Performance MySQL Server Secara Mudah
Get in Touch

KATEGORI

  • Home
  • Artikel
  • Jadwal
  • Event
  • Berita

LAYANAN

  • Zimbra Mail Server
  • Ubuntu
  • XCP-ng
  • Vinchin
  • ASAV
  • Proxmox
  • RHEL
  • Nakivo
  • SMTP Relay
  • SSL Certificate

KONTAK KAMI

PT. Excellent Infotama Kreasindo, Premier Serenity Blok J12, Jl. KH. Agus Salim No. 40E, Bekasi Jaya, Bekasi Timur, Bekasi 17112, Jawa Barat, Indonesia

TENTANG KAMI

PT. Excellent Infotama Kreasindo merupakan entitas bisnis yang fokus pada layanan komputerisasi seperti implementasi sistem, konsultasi, training/workshop, dan maintenance sistem, terutama migrasi dari sistem Windows ke Linux. more…