L
L
Lu_den2016-07-04 20:31:54
PHP
Lu_den, 2016-07-04 20:31:54

How to optimize the server for heavy scripts with a small number of users?

A number of heavy php scripts are executed on the VPS (they work up to 1500 seconds, consume quite a lot of memory). A lot of string data is being processed.
At the same time, not so many processes are usually launched per unit of time (most often 1). Those. the situation is the reverse of most sites, where there are many requests for simple quick scripts.
Advise in which direction to dig in the server setup?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Igor Vorotnev, 2016-07-04
@HeadOnFire

I understand that knowing PHP I want to solve this problem with it. But here's the point in this exactly zero, the usual laziness. String data can be safely processed at all through sed, it will be orders of magnitude faster. And make PHP just an interface.

T
ThunderCat, 2016-07-04
@ThunderCat

Is it possible to rewrite server scripts in, say, C, or something compiled, for example, python, or is this not included in the project? This would seriously speed up the system.
Disks - if possible and have not done it yet - install ssd, this will give a real increase when working with files.
If there is work with key->value values, put a radish or memcache and optimize scripts for them.
It is difficult to say the rest without specific details, because scripts with such calculations are difficult to optimize without seeing.

P
Puma Thailand, 2016-07-05
@opium

in any way, only the code can be optimized here.

A
Andrey, 2016-07-04
@GhOsT_MZ

Which subsystem is loaded the most and what is the load profile? Is a DB used? Do scripts use temporary files?

V
Viktor Taran, 2019-08-01
@shambler81

very big topic.
In general
, 1. install bitrix vm - 95% of it has already been done,
increase the time from 300 to 1500 in nginx and, in principle, this is enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question