Skip to content

Instantly share code, notes, and snippets.

@minimum2scp
Created September 9, 2012 05:17
Show Gist options
  • Save minimum2scp/3682754 to your computer and use it in GitHub Desktop.
Save minimum2scp/3682754 to your computer and use it in GitHub Desktop.
チューニンガソン(2012.09.09 明星和楽)メモ
レギュレーション
http://r.zaki.jp/tg20120909
https://dl.dropbox.com/u/3828600/tuningathon.pdf
お題: basercms
アプリ: /var/www/html/basercms
みんなのスコア http://54.248.83.90:8000/score
14:20から16:20まで
スタート
2.29650497233
devshm においてみる
2.3208287766
debian化断念
0.0
Percona-Server 5.5 + /dev/shm/mysql
3.04257683846
php-pecl-apc インストール
3.40907663068
いじりすぎてscore 0.0になったりしつつ管理画面から固定ページ、ウィジェットや
プラグインなど、使わなそうなのを消したり無効にしたり、『サーバーキャッシュ削除』をしてみたり
apache チューニング
4.07539408346
mysql チューニング
4.28734834531
apache, mysqlチューニング
4.3782886523
公式スコア
score:4.2599
apache設定いじったところ:
diff --git a/httpd/conf/httpd.conf b/httpd/conf/httpd.conf
index 5ec1006..5d8769e 100644
--- a/httpd/conf/httpd.conf
+++ b/httpd/conf/httpd.conf
@@ -100,11 +100,11 @@ KeepAliveTimeout 15
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
-StartServers 8
-MinSpareServers 5
-MaxSpareServers 20
+StartServers 15
+MinSpareServers 15
+MaxSpareServers 15
ServerLimit 256
-MaxClients 256
+MaxClients 15
MaxRequestsPerChild 4000
</IfModule>
@@ -147,57 +147,57 @@ Listen 80
# Example:
# LoadModule foo_module modules/mod_foo.so
#
-LoadModule auth_basic_module modules/mod_auth_basic.so
-LoadModule auth_digest_module modules/mod_auth_digest.so
-LoadModule authn_file_module modules/mod_authn_file.so
-LoadModule authn_alias_module modules/mod_authn_alias.so
-LoadModule authn_anon_module modules/mod_authn_anon.so
-LoadModule authn_dbm_module modules/mod_authn_dbm.so
-LoadModule authn_default_module modules/mod_authn_default.so
+#LoadModule auth_basic_module modules/mod_auth_basic.so
+#LoadModule auth_digest_module modules/mod_auth_digest.so
+#LoadModule authn_file_module modules/mod_authn_file.so
+#LoadModule authn_alias_module modules/mod_authn_alias.so
+#LoadModule authn_anon_module modules/mod_authn_anon.so
+#LoadModule authn_dbm_module modules/mod_authn_dbm.so
+#LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
-LoadModule authz_user_module modules/mod_authz_user.so
-LoadModule authz_owner_module modules/mod_authz_owner.so
-LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
-LoadModule authz_dbm_module modules/mod_authz_dbm.so
+#LoadModule authz_user_module modules/mod_authz_user.so
+#LoadModule authz_owner_module modules/mod_authz_owner.so
+#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
-LoadModule ldap_module modules/mod_ldap.so
-LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+#LoadModule ldap_module modules/mod_ldap.so
+#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
-LoadModule ext_filter_module modules/mod_ext_filter.so
-LoadModule mime_magic_module modules/mod_mime_magic.so
+#LoadModule ext_filter_module modules/mod_ext_filter.so
+#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
-LoadModule usertrack_module modules/mod_usertrack.so
+#LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
-LoadModule dav_module modules/mod_dav.so
-LoadModule status_module modules/mod_status.so
+#LoadModule dav_module modules/mod_dav.so
+#LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
-LoadModule dav_fs_module modules/mod_dav_fs.so
-LoadModule vhost_alias_module modules/mod_vhost_alias.so
+#LoadModule dav_fs_module modules/mod_dav_fs.so
+#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
-LoadModule actions_module modules/mod_actions.so
-LoadModule speling_module modules/mod_speling.so
-LoadModule userdir_module modules/mod_userdir.so
+#LoadModule actions_module modules/mod_actions.so
+#LoadModule speling_module modules/mod_speling.so
+#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
-LoadModule substitute_module modules/mod_substitute.so
+#LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule proxy_module modules/mod_proxy.so
-LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
-LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
-LoadModule proxy_http_module modules/mod_proxy_http.so
-LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-LoadModule proxy_connect_module modules/mod_proxy_connect.so
+#LoadModule proxy_module modules/mod_proxy.so
+#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+#LoadModule proxy_http_module modules/mod_proxy_http.so
+#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+#LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
-LoadModule suexec_module modules/mod_suexec.so
+#LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
-LoadModule cgi_module modules/mod_cgi.so
+#LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
#
@@ -482,14 +482,15 @@ HostnameLookups Off
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
-ErrorLog logs/error_log
+#ErrorLog logs/error_log
+ErrorLog /dev/null
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
-LogLevel warn
+LogLevel emerg
#
# The following directives define some format nicknames for use with
@@ -524,7 +525,7 @@ LogFormat "%{User-agent}i" agent
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
-CustomLog logs/access_log combined
+#CustomLog logs/access_log combined
#
# Optionally add a line containing the server version and virtual host
mysql 設定いじったところ
diff --git a/my.cnf b/my.cnf
index 6723d6b..39d7e5f 100644
--- a/my.cnf
+++ b/my.cnf
@@ -11,6 +11,10 @@ character-set-server=utf8
[mysql.server]
user=mysql
+max_connections=40
+innodb_flush_log_at_trx_commit=0
+query_cache=512M
+
[mysqld_safe]
log-error=/var/log/mysqld.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment