U
U
Urukhayy2015-03-20 15:26:51
Programming
Urukhayy, 2015-03-20 15:26:51

Running a 6 minute cycle or how much power does the VPS need?

In general, there is a VPS, the processor frequency is 400 MHz.
A cycle of 30 thousand iterations takes 6 minutes. Yes, a simple for loop takes 6 minutes.
The loop works with the cache and an array of 30,000 cells.
And at the moment, an array of 30 thousand cells needs to be increased that way up to 100 thousand cells. Accordingly, the loop will already have 100 thousand iterations.
Now such a question. How can I increase the speed? Raise the tariff for VPS, where the processor has a higher frequency?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Kubintsev, 2015-03-20
@Urukhayy

On a good note, you should be profiling your application in order to optimize bottlenecks. Maybe something even parallelize.
Only then think about increasing computing power.
Or put up with a long execution time.

H
He11ion, 2015-03-20
@He11ion

The captain of the evidence is with you: drive the script(s) into the profiler and see what performance hits and expand accordingly.

F
Fedor Ananin, 2015-05-14
@sarathorn

30.000 for 6 minutes
100.000 for ~20 minutes
Or wait, or take a more powerful server. Captain obvious.
Keep in mind that one day you will have to expand the range to 200,000 operations, and then to 1,000,000 and so on. Therefore, sooner or later you will hit the limit in general VPS. It is worth thinking about parallelizing the load on different servers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question