Sunka
Well-known member
Original post broken into several posts because of 10.000 character limit
My forum is still alive on old server, from which I have to move in next few days. My plan is to setup vps server I have bought on Digital Ocean, and after optimization is done, I just upload xenforo files from old server and upload database. Files are almost uploaded to new server, and database will be the last thing to import.
Below is my server specification, Xenforo specification and all relevant .ini and .conf files on my server (Centos + nginx + Mariad Db...).
I would be glad if you will look at all that listed data, and help me to fine tuning server for my forum. On this server will be only my forum, and nothing else. Also, from time to time, users will upload big rar-ed files to XenForo resources (50-100MB).
Remember that I could not test configuration live yet, because my forum is still online on old server, so at this moment, benchmarking is not possible, and tuning will mostly be established with datas listed below.
If any other data is needed, tell me and I will be posted in this thread.
Thank you all for your effort and time, and please have a patience with me, because I am still learning Linux and all associated with that ( 3 days ago I learned how to list file data in shell).
New VPS server (Droplet on Digital Ocean)
- Disk Space - 60 Gb SSD
- Ram - 4 GB
- CPU 2
- Swap - 2 GB
- Linux 3.10.0-229.14.1.el7.x86_64
- CentOS 7.1
- Centmin Mod 1.2.3-eva2000.08 (http://centminmod.com/)
- Nginx 1.9.6 (https / SPDY SSL / HTTP/2 SSL + ngx_pagespeed + Lua/LuaJIT support)
- PHP-FPM 5.4.45
- Zend OpCache 7.0.5+
- PHP 5.6.15
- Redis server and cache configured
- MariaDB 10.0.22, MySQL performance fork
- Multi-threaded compression: pigz, pbzip2, lbzip2, plzip, p7zip (optional)
- CSF Firewall
- Pure-FTPD Virtual FTP User support
My XenForo forum specification
- XenForo - 1.5.1
- Xenforo Media gallery addon
- Xenforo Resources addon
- Database - 831 MB (about 126 MB zipped)
- Number of attachments - 3,601
- Attachments disk usage - 9,737 MB
- Addons - 66
- Posts - 243,337
- Users total - 3,700 (online registered users in peak time is about 50 + guests)
- Peak time - 40-70 registered users + 150-200 guests + robots
.ini and .conf files
php.ini - contain default settings I belive. I will show only relevant and valid/uncommented settings, because complete original list are too long for posting.
php.ini (original)
precision = 14
output_buffering = 4096
implicit_flush = Off
serialize_precision = 17
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
post_max_size = 8M
default_mimetype = "text/html"
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[Pdo_mysql]pdo_mysql.cache_size = 2000
smtp_port = 25
sql.safe_mode = Off
mysql.cache_size = 2000
mysql.connect_timeout = 60
mysqli.cache_size = 2000
mysqli.default_port = 3306
output_buffering = 4096
implicit_flush = Off
serialize_precision = 17
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
post_max_size = 8M
default_mimetype = "text/html"
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[Pdo_mysql]pdo_mysql.cache_size = 2000
smtp_port = 25
sql.safe_mode = Off
mysql.cache_size = 2000
mysql.connect_timeout = 60
mysqli.cache_size = 2000
mysqli.default_port = 3306
customphp.ini - Some of php.ini default settings are overridden by customphp.ini
Code:
zend_extension=opcache.so
;opcache.error_log=/var/log/php_opcache_error.log
opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_wasted_percentage=5
opcache.max_accelerated_files=16000
; http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
; defaults to zend opcache checking every 180 seconds for PHP file changes
; set to zero to check every second if you are doing alot of frequent
; php file edits/developer work
; opcache.revalidate_freq=0
opcache.revalidate_freq=180
opcache.fast_shutdown=1
opcache.enable_cli=0
opcache.save_comments=1
opcache.enable_file_override=1
opcache.validate_timestamps=1[root@hostname etc]# cat /etc/centminmod/php.d/zzz_customphp.ini
date.timezone = Europe/Zagreb
max_execution_time = 240
upload_max_filesize = 256M
post_max_size = 256M
max_input_time = 120
upload_max_filesize = 256M
max_input_vars = 12000
continued in post #2