Debugging & Installations

How to tweak to speed up your hosting server?

Are you experiencing slow site loading and slowness? You can tweak the server speed by enabling some settings on server like MySQL query cache.

We know, caching is used to improve our website performance. For MySQL, there is a general query cache which can help tremendously. The MySQL is one of the important feature in MySQL and an inevitable part of query optimization. After the caching, results will be set in a memory cache like memcached or cassandra.

You can enable MySQL Query cache by editing my.cnf file or by directly going to your mysql configuration tab/panel.

Add this script and adjust it according to your requirements.

[mysqld]

default-storage-engine=MYISAM

local-infile=0

innodb_file_per_table=1

max_allowed_packet=64M

query_cache_limit=4M

query_cache_size=128M

query_cache_type=1

innodb_flush_log_at_trx_commit=2

innodb_lock_wait_timeout=200

max_connections=500

max_user_connections=45

open_files_limit = 100000

Restart the MySQL service

Next is by activating the OPcache. The OPcache is a PHP extension. This extension is a good solution to the performance issues of your website. OPcache improves the PHP performance by storing compiled script byte code in shared memory. Thus, it removes the need for PHP to load and parse scripts on each request. This feature affects the performance positively. It brings the loading time of the website down by increasing the processing speed of the request by the webserver. To an extent, OPcache also helps to avoid load on the server.

Leave a Reply

Your email address will not be published. Required fields are marked *