MRatWork Forum by Mustafa Ramadhan
Language Specific Discussions => Indonesia Users => Topic started by: sunsit on 2017-08-03, 08:28:19
-
Minta tolong Pak..
Di service kenapa ATS state nya warna merah?
-
Coba infokan 'sh /script/sysinfo; sh /script/restart-web'.
Dalam banyak kasus webcache (seperti ATS) tidak diperlukan karena web server dan atau aplikasi (seperti wordpress) ada kemampuan cache. Kesulitan lain, webcache server tidak mendukung https secara penuh (google lebih 'menyukai' akses https daripada http).
-
Web saya loadingnya lambat pak klo pas malam. load averagenya sampai 600an ,mysql sampai 2000% cpu .saya pakai apache dgn settingan maksimal.
Kalau pakai nginxproxy map domain lain ga bisa mengarah ke docroot. padahal kalau map ip bisa pak.
ATS saya matikan pak karena ga ada pengaruhnya.
opcache dan memcached q aktifkan agak membantu sedikit.
page speed ga membantu..
saya pakai script framework codeigniter.
A. Control Panel:
- Kloxo-MR: 7.0.0.c-2017080103
- Web: hiawatha-10.6.0-f.1.mr.el6.x86_64
- PHP: php56s - 5.6.31-1.ius.centos6 (fpm mode)
B. Plateform:
- OS: CentOS release 6.9 (Final) x86_64
- Hostname:
C. Services:
1. MySQL: MariaDB-server-10.0.31-1.el6.x86_64
2. PHP:
- Installed:
- Branch: php56u-cli-5.6.31-1.ius.centos6.x86_64
- Multiple:
* php56m - 5.6.31-1.ius.centos6
- Used: php56m-fpm
- Multiple: enable
3. Web Used: apache
- Hiawatha: hiawatha-10.6.0-f.1.mr.el6.x86_64
- Lighttpd: lighttpd-1.4.45-1.el6.x86_64
- Nginx: nginx-1.13.3-1.el6.ngx.x86_64
- Apache: httpd24u-2.4.27-1.ius.centos6.x86_64
- PHP Type: php-fpm_event
- Secondary PHP: on
4. WebCache: none
- ATS: --uninstalled--
- Squid: --uninstalled--
- Varnish: --uninstalled--
5. Dns: nsd
- Bind: bind-9.9.9-1.mr.el6.x86_64
- DJBDns: djbdns-1.05-17.4.mr.el6.x86_64
- NSD: nsd-4.1.16-1.el6.x86_64
- PowerDNS: pdns-4.0.3-1.el6.MIND.x86_64
- Yadifa: yadifa-2.2.3-1.mr.el6.x86_64
6. Mail: qmail-toaster-1.03-1.3.57.mr.el6.x86_64
- pop3/imap4: courier-imap-toaster-4.1.2-1.3.20.mr.el6.x86_64
- smtp: qmail-toaster-1.03-1.3.57.mr.el6.x86_64
- spam: bogofilter-1.2.4-1.el6.x86_64
7. FTP: pure-ftpd
- pure-ftpd: pure-ftpd-1.0.37-1.mr.el6.x86_64
8. Stats: --Disabled--
- --Disabled--: --uninstalled--
D. Memory:
total used free shared buffers cached
Mem: 72496 72009 486 172 857 67977
-/+ buffers/cache: 3174 69322
Swap: 4095 0 4095
E. Disk Space:
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 913G 173G 694G 20% /
-
Coba pindahkan domain tersebut ke client tersendiri (bukan admin) dan kemudian naikkan nilai 'fastcgi children' pada 'limit' untuk client terkait. Nilai yang dinaikkan bisa mulai dari 24 sampai 128.
Jika mysql seperti yang anda alami, perlu dilakukan optimize untuk mysql config.
Load yang tinggi bisa jadi karena ada antrian proses. Mengurangi antrian akan menurunkan load ini.
-
optimasi di my.conf kan pak..
sudah aku gonta ganti settingan belum ada yang pas..
bagaimana pak untuk settingan ram 72gb
-
jalankan 'mysqltuner' dari ssh sehingga tahu apa yang diubah di /etc/my.cnf.d/server.cnf.
-
sudah pak..sampe ijo semua.. malah di web loadingnya lambat..
tapi yang saya tambah di /etc/my.cnf .
apa pengaruhnya beda pak?
-
Infokan 'cat /etc/my.cnf; cat /etc/my.cnf.d/server.cnf'.
-
yang /etc/my.cnf udah saya rubah2 terus karena ga ada efeknya..
[root@server ~]# cat /etc/my.cnf; cat /etc/my.cnf.d/server.cnf
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
#default-storage-engine = myisam
#skip-innodb
#port = 3306
#socket = /var/lib/mysql/mysql.sock
#skip-external-locking
#skip-name-resolve
max_connections = 2000
#query_cache_type = 1
#query_cache_limit = 256K
#query_cache_min_res_unit = 2k
#query_cache_size = 268435456
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
max-allowed-packet=256M
performance-schema=on
default-storage-engine=myisam
skip-innodb
#OpenVZ AIO bug fix
innodb-use-native-aio=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.0 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.0]
-
Infokan satu-satu yaitu 'cat /etc/my.cnf' dan kemudian 'cat /etc/my.cnf.d/server.cnf'
-
[root@server ~]# cat /etc/my.cnf
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
#default-storage-engine = myisam
#skip-innodb
#port = 3306
#socket = /var/lib/mysql/mysql.sock
#skip-external-locking
#skip-name-resolve
max_connections = 2000
#query_cache_type = 1
#query_cache_limit = 256K
#query_cache_min_res_unit = 2k
#query_cache_size = 268435456
[root@server ~]#
[root@server ~]# cat /etc/my.cnf.d/server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
max-allowed-packet=256M
performance-schema=on
default-storage-engine=myisam
skip-innodb
#OpenVZ AIO bug fix
innodb-use-native-aio=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.0 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.0]
[root@server ~]#
-
1. Ubah isi /etc/my.cnf menjadi:
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
sehingga selanjutnya config mysql berada di /etc/my.cnf.d/server.cnf.
2. Install mysqltuner dengan 'yum install mysqltuner -y'
3. Jika anda tidak tahu password untuk mysql root, lakukan 'sh /script/reset-mysql-root-password PASSWORDANDA'
4. Jalankan 'mysqltuner --user root --pass PASSWORDANDA'. Akan ditampilkan rekomendasi mysql configs.
5. Perlu dilakukan berkali-kali sehingga hasilnya sesuai dimana setelah ubah isi /etc/my.cnf.d/server.cnf maka perlu dilakukan restart mysql dengan 'sh /script/restart-mysql'.
-
php-fpm type pilih yang mana pak.. dynamic atau ondemand?
-
Pada kasus anda lebih baik pilih 'dynamic'.