E
E
E2018-04-17 09:53:27
MySQL
E, 2018-04-17 09:53:27

Correct mysql setup?

we have 1Gb RAM on vps
such is the cron procedure
5ad599d123760150640991.png
, every hour, a php script is launched with a lot of requests to the database for updating. As a result, every hour I have a processor load of 100%.
Prompt correct setting for mysql.
at the moment the settings look like this, the standard configuration file and my additions


[mysqld]
innodb_flush_method = "O_DIRECT"
innodb_flush_log_at_trx_commit = 1
key_buffer = 128M
innodb_buffer_pool_size = 128M
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 16M

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Spiridonov, 2018-04-17
@customtema

Perhaps it is necessary not to configure MySQL, but to revise that script?

Y
Yan-s, 2018-04-17
@Yan-s

E , "if I rummaged around in this, I would not ask this question", well, you don’t ask if it’s normal and you didn’t specify the duration of the load, although the problem is precisely in it, but what loads 100% is completely normal.
It is strange that you have to make 10 requests to update 1 product and it is strange that every hour you need to update all positions. Is it possible to optimize the number of queries to start with?
Then, it is necessary to study the requests themselves, probably only some of them are "heavy". We need to figure out what makes them heavy. To do this, try running queries manually with explain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question