K
K
Kirill Larin2022-01-22 17:31:15
PHP
Kirill Larin, 2022-01-22 17:31:15

How to force wpallimport php 8 to use multiple cores?

We have a server with 4 cores, 12 gigs of ram and php 8 apache2.4. We started importing through wp-cli, the fact is that it does not load the cores at all, the frequency of each core is 4 GHz, the import speed is about 60-70k goods per day. And the maximum load of wpallimport on the core is only 30-40%. As far as I understand php cannot use multiple cores when executing. The number of iterations is 100 at a time, the import goes back to back one after the other. The wpallimport itself eats no more than 4.5 GB, the limits are all removed that can be removed. both from the apache side and from the php side and from the mysql side.

%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG?_uid=105115239&hid=1.1.3&ids=178173660257931341&name=%D0%A1%D0%BD%D0%B8% D0%BC%D0%BE%D0%BA.PNG&yandex_class=yandex_inline_content_320.mail:105115239.E5879999:91819153682827225532553438435_1.1.3_178173660257931341
%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG?_uid=105115239&hid=1.1.2&ids=178173660257931341&name=%D0%A1%D0%BD%D0%B8% D0%BC%D0%BE%D0%BA.PNG&yandex_class=yandex_inline_content_320.mail:105115239.E5879999:91819153682827225532553438435_1.1.2_178173660257931341

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2022-01-22
@rPman

what exactly loads the processor? database or php?
As far as I know, it is single-threaded, with some chances you can dig into the sources and optimize something, but the work is clearly not for a couple of minutes
ps read here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question