Is there any example on how to edit the my.cnf file

Started by Thilo, May 30, 2017, 06:26:35 AM

Previous topic - Next topic

Thilo

Hi together,

i try to optimize my MySQL Settings.

I have 2 large forums on one virtual Server.

The server itself is pretty fast (SSD Raid, 8 GM RAM, 4 (Virtual) CPU-Cores).
i have nothing else running on the machine.

The 2 forums together are serving the content to about 500 users online as a maximum.

So i want to optimize the mySQL Settings for SMF.

Is there an example anywhere which i can adopt?

Right now i only have this content:

query_cache_type = 1
tmp_table_size          = 1024M
max_heap_table_size     = 1024M
key_buffer_size         = 680M
query_cache_limit       = 8M
query_cache_size        = 256M
max_connections         = 500
open_files_limit        = 4096

innodb_buffer_pool_size = 512M
join_buffer_size        = 256K


Greets,
Thilo

Arantor

Does it run fast enough right now? If it does, I really wouldn't worry about it. What you have looks pretty sane for the described size of board but as it grows you likely will need to change the settings. But trying to use settings for a bigger forum at your current size is almost always counterproductive.

Thilo

Well - on 22 hours a day it is fast as it possibly can be... (really fast!)

On a high frequented time the server got a little bit slow yesterday.
But i haven't checked the option "persistant_database_connection" (is that the right name?)

So i activated that option today and will have a look at the speed this evening.



Arantor

I haven't seen a need to enable that on a forum in over a decade.

Thing is, you're asserting it got slow but who says the database was the cause of the slowness? Why not something in the PHP?

vbgamer45

What are you caching settings in SMF itself? Are you using any caching system?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Thilo

i tried to install memcached but failed... maybe because "opcache" is activated...

is there actually a benefit of memcached in comparison to opcache?


Well - right now the forums are responding quite fast...


vbgamer45

Yeah it is a difference. memcache in SMF caches data like sql query results Which means less calls to the database and able to manage higher load.  Try maybe just memcache instead.
Opcode cache caches php code that is executed
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: