MySQL thay đổi có lẽ lưu kết quả của một truy vấn trong bộ nhớ cache riêng của nó. Để kích hoạt nó biên tập các tập tin cấu hình MySQL (thường /etc/my.cnf) và thêm những dòng này: query_cache_type = 1 query_cache_limit = 1M query_cache_size = 16M
hợp chẳng khác gì lý vps
Toi hỗ trợ uu vps
Để đánh chưa giá xem nó quá chính xác là luôn chạy và toi uu vps, chạy truy vấn này:
SHOW STATUS chẳng LIKE ‘Qcache%’;
Kết quả:
Qcache mô hình _free_blocks | 718 |
Qcache xem trọng _free_memory | 1 định 3004008 |
Qcache cần _hits | 780759 |
Qcache chỉ _inserts | 5 cũng 6292 |
Qcache cũ _lowmem_prunes | 0 |
Qcache đặt chỗ _not_cached | 3711 |
Qcache luôn _queries_in_cache | 1 nhanh 715 |
Qcache thôi _total_blocks | 4344 |
Cách hợp nhanh lý vps
Hơn nữa ngay MySQL hợp lý hóa cả với cách hợp lý vps: chưa Có rất nhiều tùy chọn, bạn có lẽ chơi với giống như vậy ở đây là tập tin cấu hình MySQL của tôi thay vào đó, điều chỉnh trong hosting giá phải chăng 4GB, quad-core máy chuyên dụng. Cách hợp lý vps điều này có lẽ sẽ không làm việc cho đa số các máy tính của bạn ra khỏi hộp, tiêu dùng nó giống như một có các hướng dẫn chung.
[mysqld] bulk_insert_buffer_size những = 8M nhất connect_timeout=10 interactive_timeout=50 nhanh join_buffer=1M key_buffer=250M max_allowed_packet=16M max_connect_errors=10 max_connections=100 max_heap_table_size = 32M myisam_sort_buffer_size=96M query_cache_limit = 4M query_cache_size = 250M query_cache_type = 1 query_prealloc_size = 65K query_alloc_block_size = 128K read_buffer_size=1M read_rnd_buffer_size=768K record_buffer=1M safe-show-database skip-innodb skip-locking skip-networking sort_buffer=1M table_cache=4096 thread_cache_size=1024 thread_concurrency=8 tmp_table_size = 32M wait_timeout=500 # for slow queries, comment when not used #log-slow-queries=/var/log/mysql-slow.log #long_query_time=1 #log-queries-not-using-indexes [mysqld_safe] nice = -5 open_files_limit = 8192 [mysqldump] quick max_allowed_packet = 16M [myisamchk] key_buffer = 64M sort_buffer = 64M read_buffer = 16M write_buffer = 16MPHP miễn phí Opcode Cache
phpize thu thập dữ liệu ./configure make make install
Điều có những nơi này sẽ cài đặt eAccelerator. Tiếp theo, tạo thư mục tạm để lưu trữ:
mkdir nhộn nhịp /var/cache/eaccelerator chmod 0777 /var/cache/eaccelerator
Finally to enable it, nhất add these có lẽ lines to the end of đột nhiên your php.ini file (usually /etc nhất /php.ini or /usr chưa /lib/php.ini):
extension=”eaccelerator.so” eaccelerator.shm_size=”16″ eaccelerator.cache_dir=”/var/cache/eaccelerator” eaccelerator.enable=”1″ eaccelerator.optimizer=”1″ không thể eaccelerator.check_mtime=”1″ eaccelerator.debug=”0″ quá eaccelerator.filter=”” eaccelerator.shm_max=”0″ lắm eaccelerator.shm_ttl=”0″ eaccelerator.shm_prune_period=”0″ eaccelerator.shm_only=”0″ eaccelerator.compress=”1″ eaccelerator.compress_level=”9″
Võ Minh Tốt ()
Với hơn 4 năm kinh nghiệm lập trình (Python, PHP, JS, Wordpress...) và 6+ năm thực chiến trong quản trị website, tôi tư vấn giải pháp SEO từ khóa & marketing online tối ưu cho doanh nghiệp. Hiện là Trưởng phòng Kinh doanh tại Siêu Tốc Việt.