Skip to content

[Question] why multiple receviePings make user CPU Usage 100% in napi-busy-poll-server.c #1451

@2jeonghoon

Description

@2jeonghoon

I made message broadcasting server using napi-busy-poll-server examples. And I want to process batch completion to consume CQ faster. So, I need to submit multiple receivePings for that. In this case, if more than 2 receivePing(recvmsg) submission is submitted, than user's system cpu usage bursts as follow:

 273 04:18:43 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 274 04:18:44 PM     0     10038         -   15.00  180.00    0.00    2.00  195.00     2  napi-busy-poll-
 275 04:18:44 PM     0         -     10038   14.00   81.00    0.00    2.00   95.00     2  |__napi-busy-poll-
 276 04:18:44 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 277
 278 04:18:44 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 279 04:18:45 PM     0     10038         -   13.00  183.00    0.00    2.00  196.00     2  napi-busy-poll-
 280 04:18:45 PM     0         -     10038   13.00   82.00    0.00    2.00   95.00     2  |__napi-busy-poll-
 281 04:18:45 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 282
 283 04:18:45 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 284 04:18:46 PM     0     10038         -   18.00  176.00    0.00    3.00  194.00     2  napi-busy-poll-
 285 04:18:46 PM     0         -     10038   17.00   77.00    0.00    3.00   94.00     2  |__napi-busy-poll-
 286 04:18:46 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 287
 288 04:18:46 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 289 04:18:47 PM     0     10038         -   15.00  180.00    0.00    2.00  195.00     2  napi-busy-poll-
 290 04:18:47 PM     0         -     10038   16.00   80.00    0.00    2.00   96.00     2  |__napi-busy-poll-
 291 04:18:47 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 292
 293 04:18:47 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 294 04:18:48 PM     0     10038         -   17.00  178.00    0.00    3.00  195.00     2  napi-busy-poll-
 295 04:18:48 PM     0         -     10038   16.00   79.00    0.00    3.00   95.00     2  |__napi-busy-poll-
 296 04:18:48 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 297
 298 04:18:48 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 299 04:18:49 PM     0     10038         -   14.00  181.00    0.00    2.00  195.00     2  napi-busy-poll-
 300 04:18:49 PM     0         -     10038   14.00   81.00    0.00    2.00   95.00     2  |__napi-busy-poll-
 301 04:18:49 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 302
 303 04:18:49 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 304 04:18:50 PM     0     10038         -   13.00  182.00    0.00    2.00  195.00     2  napi-busy-poll-
 305 04:18:50 PM     0         -     10038   13.00   82.00    0.00    2.00   95.00     2  |__napi-busy-poll-
 306 04:18:50 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 307
 308 04:18:50 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 309 04:18:51 PM     0     10038         -   17.00  178.00    0.00    3.00  195.00     2  napi-busy-poll-
 310 04:18:51 PM     0         -     10038   16.00   78.00    0.00    3.00   94.00     2  |__napi-busy-poll-
 311 04:18:51 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 312
 313 04:18:51 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 314 04:18:52 PM     0     10038         -   14.00  181.00    0.00    2.00  195.00     2  napi-busy-poll-
 315 04:18:52 PM     0         -     10038   15.00   81.00    0.00    2.00   96.00     2  |__napi-busy-poll-
 316 04:18:52 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038
 317
 318 04:18:52 PM   UID      TGID       TID    %usr %system  %guest   %wait    %CPU   CPU  Command
 319 04:18:53 PM     0     10038         -   18.00  177.00    0.00    2.00  195.00     2  napi-busy-poll-
 320 04:18:53 PM     0         -     10038   17.00   78.00    0.00    2.00   95.00     2  |__napi-busy-poll-
 321 04:18:53 PM     0         -     10040    0.00  100.00    0.00    0.00  100.00     0  |__iou-sqp-10038

Why does this happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions