Editing WordPress Optimization

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 109: Line 109:
 
Generally speaking you will want to give MySQL at least 128MB of RAM for innodb_buffer_pool, if you have a larger database then raise this to an appropriate limit. Keep in mind that you don't want to set innodb_buffer_pool to a value that is higher than the amount of RAM on the server, otherwise it could start to swap out pages and performance will drop quickly. If this is a brand new WordPress install then a buffer pool size of 128MB should be plenty. You will also want to increase the size of innodb log files. By default the value is 5MB, at least for older versions of MySQL and 48MB for MySQL 5.6 or newer. Since the VPS I am using has all SSD storage I will be raising the log size to 128MB. There are two log files, so the total size would be 256MB between both log files. If you raise this value too high and the server crashes it might take a minute or two for MySQL to replay back the logs to recover data, this used to be an issue with slower, spinning HDDs, however SSDs can replay log files much faster, so increasing the size will help with write performance.
 
Generally speaking you will want to give MySQL at least 128MB of RAM for innodb_buffer_pool, if you have a larger database then raise this to an appropriate limit. Keep in mind that you don't want to set innodb_buffer_pool to a value that is higher than the amount of RAM on the server, otherwise it could start to swap out pages and performance will drop quickly. If this is a brand new WordPress install then a buffer pool size of 128MB should be plenty. You will also want to increase the size of innodb log files. By default the value is 5MB, at least for older versions of MySQL and 48MB for MySQL 5.6 or newer. Since the VPS I am using has all SSD storage I will be raising the log size to 128MB. There are two log files, so the total size would be 256MB between both log files. If you raise this value too high and the server crashes it might take a minute or two for MySQL to replay back the logs to recover data, this used to be an issue with slower, spinning HDDs, however SSDs can replay log files much faster, so increasing the size will help with write performance.
  
'''Please note that you must move the [http://wiki.mikejung.biz/MySQL#InnoDB_Log_Size_AND_Block_Size old innodb logs] out of the way, stop MySQL and then start it up again. If you do not do this then MySQL will fail to start and you will have downtime on your hands until you remove the old log files.'''
+
'''Please note that you must move the '''[http://wiki.mikejung.biz/MySQL#InnoDB_Log_Size_AND_Block_Size old innodb logs]''' out of the way, stop MySQL and then start it up again. If you do not do this then MySQL will fail to start and you will have downtime on your hands until you remove the old log files.'''
  
 
This MySQL configuration should work well for most servers with '''1GB or 2GB of RAM'''.  
 
This MySQL configuration should work well for most servers with '''1GB or 2GB of RAM'''.  

Please note that all contributions to wiki.mikejung.biz may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see wiki.mikejung.biz:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)