K
K
Kirill Gorelov2017-05-22 11:57:52
PHP
Kirill Gorelov, 2017-05-22 11:57:52

Advice on optimizing the work of the parser on php and the server?

Hello.
Wrote an aggregator of articles from 5 different sites.
The parser works once a minute for different sites.
That is, 5 different parsers are launched per minute.
Parsers are written in php.
And I have a server on ubuntu with 2GB of RAM on an open kvz configuration.
And the control panel.
And in the panel, I see the load on my server, which gives me a message.
Can you tell me if these are normal?
Can this be improved somehow?
What to pay attention to?
The fact is that in the near future I will only increase the number of parsers, so advice to me is extremely necessary.
Total Load
66f25fcb82c34d6294fff7bf830ab080.png
Memory
67da763787724cf3b33443e96f740ed7.png
Usage Network Usage
c7a770cd83184570974f48e37b3c777f.png
Apache
3d6d3515b4634d43b312a3fe0245ea01.png
Mysql
0585304760d04e35bbcc2216628406cb.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
romy4, 2017-05-22
@romy4

run once a minute a script that will distribute the launch of 5 parsers during this minute

S
Shirshov Alexander, 2017-05-22
@Keanor

Indicators are normal, not negative, digital.
One of the main load balancing tools: www.phphighload.com/2013/08/amqp-rabbitmq.html
It will help you when this server is not enough.
Part of the handlers can be painlessly transferred to another.
This will also help to localize profiling, and measure the performance of a single handler.
+ there is a useful trick for parsers, if you can’t get the page (the network is not reliable when parsing), you can simply crash with an error and the task will be returned to the queue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question