I
I
Ivan Gromov2015-06-30 18:14:39
linux
Ivan Gromov, 2015-06-30 18:14:39

Why is apache processing slow?

There is a tutorial that generates requests to the server (written in C++). Server - apache2, OS Ubuntu Server. I want to achieve a speed of 128 Kbps, I transfer in portions of 400 bytes, therefore, I make 40 requests per second. Each request is a separate thread. On apache I measure the speed at which everything is transferred (sending a file), but it turns out less than one and a half times than it should be. I'm testing all this on the loopback interface, so it's unlikely that there will be network delays. Can you tell me where to look? Maybe how to properly configure apache is not particularly strong in this matter. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Axian Ltd., 2015-08-17
@AxianLTD

1. Apache has several types of handlers - the main difference is a pool of threads, a pool of processes. The thread is somewhat faster than the process, but the process also provides more isolation (i.e. security).
2. In apache, the settings indicate the starting number of processes (threads) in the pool and the maximum number of processes (threads), and the increment step. If, say, the pool has 20, and 21 requests have arrived at the same time, then apache will spend a certain time starting the process (thread).
3. And one request of 100 bytes is able to "pack" apache.
4. Apache will receive the file in one thread, unless you specifically wrote a handler on the apache side. There is no parallel here. Obscure statement of the problem, its solution and methods of measurement. For apache there is a regular test ab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question