Why is apache slow to process?
There is a tutorial that generates server requests (written in C ++). Server - apache2, Ubuntu Server OS. I want to achieve a speed of 128 Kbit / s, I transmit 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 transmitted (sending the file), but it turns out less than one and a half times than it should be. I test all this on the loopback interface, so there is hardly any network latency. Can you tell me where to look? Maybe, how to properly configure apache is not particularly strong in this matter. Thank you.C++ Anonymous, Nov 22, 2019
1. Apache has several types of handlers - the main difference is the thread pool, the process pool. The flow is slightly faster than the process, but the process also provides more isolation (i.e. safety).
2. For 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 amount of 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 parallelism here. Unclear problem statement, solution and measurement methods. There is a standard ab test for apache.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!