多进程i/o 比单进程快吗
Two notices: 1, a process has only one main thread which is itself. 2, a process has many threads.
有两个注意事项:1,一个进程只有一个主线程本身。 2,一个进程有很多线程。
Solution 1: Please use taskstats [1] related interfaces, and send TASKSTATS_TYPE_PID and TASKSTATS_TYPE_TGID commands to kernel to get a process’s ‘blkio_delay_total’ parameter for a process with one main thread and a process with threads separately.
解决方案1:请使用与taskstats [1]相关的接口,并将TASKSTATS_TYPE_PID和TASKSTATS_TYPE_TGID命令发送到内核,以获取具有一个主线程的进程和具有线程的进程的进程的'blkio_delay_total'参数。
Solution 2: instrument kernel to get process’s I/O utilization percentage. See [2] for details.
解决方案2:使用仪器内核获取进程的I / O利用率。 有关详细信息,请参见[2]。
[1] https://www.kernel.org/doc/Documentation/accounting/
[2] https://github.com/iovisor/bcc
[1] https://www.kernel.org/doc/Documentation/accounting/
[2] https://github.com/iovisor/bcc
翻译自: https://www.systutorials.com/how-to-get-processes-i-o-utilization-percentage/
多进程i/o 比单进程快吗