KUSANAGI for Microsoft Azure の設定を探ってみた



[root@kusanagi shimizu]# uname -a
Linux kusanagi 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@kusanagi shimizu]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)


[root@kusanagi shimizu]# nginx -v
nginx version: nginx/1.8.0
[root@kusanagi shimizu]# cat /etc/nginx/nginx.conf
## nginx.conf

user httpd www;
worker_processes  auto;
worker_rlimit_nofile  20000;

error_log /var/log/nginx/error.log warn;
pid       /var/run/nginx.pid;

events {
        worker_connections 4096;
        multi_accept on;
        use epoll;

http {
        server_tokens off;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        charset UTF-8;

        log_format main '$request_time $sent_http_x_f_cache $sent_http_x_b_cache '
                        '$remote_addr - $remote_user [$time_local] "$request" '
                                    '$status $body_bytes_sent "$http_referer" '
                                        '"$http_user_agent" "$http_x_forwarded_for"';

        access_log /var/log/nginx/access.log  main;
        client_max_body_size     20M;
        client_body_buffer_size 768k;
        sendfile    on;
        tcp_nopush  on;
        tcp_nodelay on;

        keepalive_timeout 5;
        connection_pool_size 1024;
        request_pool_size 8k;

        gzip on;
        gzip_http_version 1.0;
        gzip_disable "msie6";
        gzip_proxied any;
        gzip_min_length 1024;
        gzip_comp_level 2;
        gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;

        open_file_cache max=100000 inactive=20s;
        open_file_cache_valid 30s;
        open_file_cache_min_uses 2;
        open_file_cache_errors on;

        fastcgi_cache_path /var/cache/nginx/wordpress levels=1:2 keys_zone=wpcache:30m max_size=512M inactive=600m;
        fastcgi_ignore_headers "Vary";

        include /etc/nginx/conf.d/*.conf;



[root@kusanagi shimizu]# mysql --version
mysql  Ver 15.1 Distrib 10.0.22-MariaDB, for Linux (x86_64) using readline 5.1

[root@kusanagi shimizu]# 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

# this is only for the mysqld standalone daemon
character_set_server = utf8mb4
max_connections = 900
thread_cache_size = 300
table_cache = 256
max_allowed_packet = 16M
query_cache_size = 192M
tmp_table_size = 32M
max_heap_table_size = 32M
thread_stack = 512K

key_buffer_size = 32M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 1M
join_buffer_size = 1M

myisam_sort_buffer_size = 1M
bulk_insert_buffer_size = 1M

innodb_buffer_pool_size = 768M
innodb_log_file_size = 32M
innodb_use_sys_malloc = 1
innodb_thread_concurrency = 8

log-error = /var/log/mysql/mysqld.log
log-warnings = 1

slow_query_log = 1
slow_query_log_file = "/var/log/mysql/slow.log"
long_query_time = 1.2

# * Galera-related settings
# Mandatory settings
# Optional setting

# this is only for embedded server

# 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

# 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