On 05/02/2017 05:43 PM, Markus Armbruster wrote: > "Denis V. Lunev" <d...@openvz.org> writes: > >> Right now QMP and HMP monitors read 1 byte at a time from the socket, which >> is very inefficient. With 100+ VMs on the host this easily reasults in >> a lot of unnecessary system calls and CPU usage in the system. >> >> This patch changes the amount of data to read to 4096 bytes, which matches >> buffer size on the channel level. Fortunately, monitor protocol is >> synchronous right now thus we should not face side effects in reality. > Can you explain briefly why this relies on "synchronous"? I've spent > all of two seconds on the question myself... Each command is processed in sequence as it appears in the channel. The answer to the command is sent and only after that next command is processed.
Theoretically tith asynchronous processing we can have some side effects due to changed buffer size. Den