RAM 1.5GB burst 2gb CPU x2 2.4GHz
ตอนนี้ใช้ramไปแล้วประมาณ 787MB
จะปรับ my.cnf httpd php ยังไงให้ดึงความสามารถของ VPS ให้เต็มประสิทธิภาพอะครับ
my.cnf ผมปรับ
max_connections = 500
key_buffer = 384M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 2M
sort_buffer_size = 4M
table_cache = 1536
thread_cache = 8
thread_concurrency = 4
thread_cache_size = 256
wait_timeout = 600
connect_timeout = 10
max_tmp_tables = 256
tmp_table_size = 64M
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
max_heap_table_size = 256M
ส่วนhttpd ผมปรับ
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 1024
KeepAliveTimeout 10
<IfModule prefork.c>
StartServers 10
MinSpareServers 20
MaxSpareServers 40
ServerLimit 1024
MaxClients 1024
MaxRequestsPerChild 0
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
php.ini
;max_execution_time = 30 ; Maximum execution time of each script, in seconds
;max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
;memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)
***** memory_limit ****อันนี้ผมไม่เข้าใจอะครับว่ามันใช่อันเดียวกับข้างล่างตรง Added by Kloxo file/phpini/php.ini.temp ป่าวอะครับ แล้วถ้าปรับมากปรับน้อยผลมันจะเป็นยังไงอะครับข้อดีข้อเสีย
; Maximum size of POST data that PHP will accept.
;post_max_size = 8M
;post_max_size = __lx_post_max_size
;—
; Added by Kloxo file/phpini/php.ini.temp
;—
register_globals = off
display_errors = off
file_uploads = on
upload_max_filesize = 600M
log_errors = off
output_buffering = off
register_argc_argv = on
magic_quotes_gpc = off
post_max_size = 800M
magic_quotes_runtime = off
magic_quotes_sybase = off
mysql.allow_persistent = off
max_execution_time = 300
max_input_time = 60
memory_limit = 1024M
post_max_size = 800M
allow_url_fopen = on
allow_url_include = on
register_long_arrays = on
session.save_path = /var/lib/php/session
cgi.force_redirect = on
; sendmail_from =
safe_mode = off
enable_dl = on
zlib.output_compression = off
ผมควรเพิ่มหรือลดส่วนไหนบ้างอะครับ
ช่วยแนะนำทีครับ