Page 1 of 2

Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 3:08 pm
by azlanirda
Hello dpeca

I would like to know if there are any special setting to set myvesta to handle 10k visitor at a time.

Before this, using the same server, i am using vesta with nginx + phpfpm, and can handle 10k visitor at a time without the server go into high load...

the server spec is Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 8 core, 32GB

in january, when i open for an event registration, the server load is around 4-5 (max) (using nginx + phpfpm vestacp)

yesterday, when open an event for registration, the server load goes max 8 for over an hour (that is the time the registration is open...)

any idea why or tips to solev this matter...

or is it okay...

thanks for your advice in advanced...

- Azlan

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 3:55 pm
by myVesta
The only thing you can do is to alter mysql buffers - viewtopic.php?f=27&t=322

And check "pm.max_children" in pool.d folder of php-fpm - viewtopic.php?f=18&t=54

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 3:58 pm
by azlanirda
okay dpeca... thanks for the feedback...

i will try it, and post an update next week.... as the event is weekly event...

thanks again...

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 4:01 pm
by myVesta
What type of CMS you are using? WordPress?

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 4:03 pm
by azlanirda
yes, wordpress...

i have redis install.. with bunny cdn...

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 4:16 pm
by azlanirda
dpeca wrote: Thu Mar 04, 2021 3:55 pm The only thing you can do is to alter mysql buffers - viewtopic.php?f=27&t=322

And check "pm.max_children" in pool.d folder of php-fpm - viewtopic.php?f=18&t=54
what is the number that i can change it.. i already set it to 10 for the pm.max_children

my setting

pm = ondemand
pm.max_children = 10
request_terminate_timeout = 90s
pm.max_requests = 6000
pm.process_idle_timeout = 10s
pm.status_path = /status

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 4:24 pm
by myVesta
azlanirda wrote: Thu Mar 04, 2021 4:03 pm yes, wordpress...

i have redis install.. with bunny cdn...
do you use some WP plugin for caching to Redis?

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 4:32 pm
by azlanirda
i use Redis Object Cache plugin...

okay, i have set also the mysql mariadb.cnf...

there are a few line that is missing, so i add.. and i also commented the ones that you did...

i will give feedback how is the performance...

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Thu Mar 04, 2021 6:32 pm
by myVesta
i hope you will share with us what did you added and modified in mariadb.conf :)

Re: Setup MyVesta to handle 10k visitor at a time

Posted: Fri Mar 05, 2021 2:52 pm
by azlanirda
here is the line that i change in mariadb.cnf

skip-external-locking
key_buffer_size = 512M - before it is 256M
max_allowed_packet = 32M
# table_open_cache = 256
sort_buffer_size = 4M - 2M before this
net_buffer_length = 16K - 8k before
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 128M
# thread_cache_size = 8 - before uncommented
# query_cache_size= 16M - before uncommented
# thread_concurrency = 8 - before uncommented

#innodb_use_native_aio = 0
innodb_file_per_table

max_connections=200
max_user_connections=199
# wait_timeout=30 - before uncommented
interactive_timeout=50
long_query_time=5

// before this few lines was not in my conf file
table_open_cache = 20480
thread_cache_size = 384
query_cache_size = 50M
# thread_concurrency = 16
wait_timeout = 180
join_buffer_size = 16M
query_cache_type = 1
tmp_table_size = 512M
innodb_buffer_pool_size=4G
// up till here...

!includedir /etc/mysql/conf.d/

basically i just follow the ones that you put to optimize the database if have RAM more than 32GB