سلام
من یه سرور مجازی لینوکس centos 6.5 دارم با کنترل پنل دایرکت ادمین
cpu: 3هسته ای
رم: 6 گیگ
چه کانفیگی مناسب هست که توی فایل my.cnf بذارم
الان این فایل خالی هستش و هیچی توش نیست
سلام
من یه سرور مجازی لینوکس centos 6.5 دارم با کنترل پنل دایرکت ادمین
cpu: 3هسته ای
رم: 6 گیگ
چه کانفیگی مناسب هست که توی فایل my.cnf بذارم
الان این فایل خالی هستش و هیچی توش نیست
اینارو داد
کدوم هارو بذارم توی my.cnf?
اون فایلم کلا خالیه
کد HTML:>> MySQLTuner 1.3.0 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [OK] Currently running supported MySQL version 5.5.31 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM [--] Data in MyISAM tables: 250M (Tables: 203) [--] Data in InnoDB tables: 183M (Tables: 317) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17) [--] Data in MEMORY tables: 0B (Tables: 1) [!!] Total fragmented tables: 333 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 6h 36m 31s (3M q [153.599 qps], 212K conn, TX: 12B, RX: 299M) [--] Reads / Writes: 97% / 3% [--] Total buffers: 168.0M global + 2.8M per thread (151 max threads) [OK] Maximum possible memory usage: 583.2M (9% of installed RAM) [OK] Slow queries: 0% (0/3M) [OK] Highest usage of available connections: 13% (21/151) [OK] Key buffer size / total MyISAM indexes: 8.0M/182.7M [OK] Key buffer hit rate: 98.4% (1B cached / 16M reads) [!!] Query cache is disabled [OK] Sorts requiring temporary tables: 0% (179 temp sorts / 610K sorts) [!!] Temporary tables created on disk: 42% (173K on disk / 405K total) [!!] Thread cache is disabled [!!] Table cache hit rate: 3% (393 open / 11K opened) [OK] Open file limit used: 40% (410/1K) [OK] Table locks acquired immediately: 99% (2M immediate / 2M locks) [!!] InnoDB buffer pool / data size: 128.0M/183.7M [OK] InnoDB log waits: 0 -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Enable the slow query log to troubleshoot bad queries When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Set thread_cache_size to 4 as a starting value Increase table_open_cache gradually to avoid file descriptor limits Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C Variables to adjust: query_cache_size (>= 8M) tmp_table_size (> 16M) max_heap_table_size (> 16M) thread_cache_size (start at 4) table_open_cache (> 400) innodb_buffer_pool_size (>= 183M)
سلام
این کانفیگ برای این منابع خوب هست ولی باز باید بیشتر بررسی بشه چون من نمیدونم روی سرور شما چه اسکریپتی نصب هست:
[mysqld]
skip-innodb
default-storage-engine = MyISAM
long_query_time = 3
back_log = 50
max_connections = 500
max_user_connections= 200
key_buffer_size = 512M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 2048M
join_buffer_size = 2M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 12000
thread_cache_size = 1024
wait_timeout = 1000
interactive_timeout = 500
connect_timeout = 600
tmp_table_size = 256M
max_heap_table_size = 256M
max_allowed_packet = 128M
net_buffer_length = 16384
max_connect_errors = 100000
thread_concurrency = 16
concurrent_insert = 2
read_rnd_buffer_size = 1M
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
range_alloc_block_size = 4096
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_write_lock_count = 8
local-infile=0
open_files_limit=15638
local-infile=0
open_files_limit=15638
سرور مجازی | سرور اختصاصی
تلفن: (66015891)021 ~ تلگرام:09213601063
سرور مجازی, سرور اختصاصی, هاست|نوین هاست
درود
بردار گرامی کانفیگ شما اول اینکه روی mysql 5.6 جوابگو نیست و باعث میشه mysql استارت نشود بدلیل وجود table cache که در mysql 5.6 به بعد ساپورت نمیشود
و دوم اینکه استفاده از مقادیری مانند skip-innodb باعث از کار افتادن اسکریپت های تحت innodb مانند برخی انجمن ها میشود و مشکلات دیگر..
ضمن تشکر از شما که هدفتون کمک هستش پیشنهاد میکنم در مورد مواردی که به کاربران کمک میکنید اطلاعات دقیق تری ذکر کنید
ارادت
![]()
:: کارشناس فنی هاستینگ و مدیریت سرور
:: کانفیگ حرفه ای سرور مجازی و اختصاصی و رفع اشکال سرور از سال 1388
:: وب سایت : www.nginxweb.ir | تلفن شرکت: 02191300834
از https://raw.github.com/rackerhacker/.../mysqltuner.pl برای بهینه کردن استفاده کنید برای تنظیمات معمولی برای شما مناسب است
up
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)