Bug 206919 - Very bad performance of sendto function
Summary: Very bad performance of sendto function
Status: RESOLVED INSUFFICIENT_DATA
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-22 11:22 UTC by Bernat Arlandis
Modified: 2020-03-24 16:03 UTC (History)
0 users

See Also:
Kernel Version: 5.4.13
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Sysprof capture file (1.87 MB, application/gzip)
2020-03-22 11:22 UTC, Bernat Arlandis
Details

Description Bernat Arlandis 2020-03-22 11:22:46 UTC
Created attachment 288007 [details]
Sysprof capture file

Hi,

I have a case where the sendto function is slowing down the software I'm trying to use. Sysprof capture file attached.

It's probably being called at a high frequency and the __netlink_dump_start function spends a lot of time in the mutex lock, then also in the netlink_dump call.

This is causing the threads calling the function to stall. At least this is my interpretation of the profiling session.

I don't have any knowledge about the way networking code works. I'd like to know if the flaw is in the user-space software or in the kernel. Can I provide any more info or do some test to help determine what's happening? I'd like to help fix it.

My NIC: Intel Corporation I211 Gigabit Network Connection (rev 03)

My system: Debian 10 with kernel 5.4.13.

Thanks.
Comment 1 Stephen Hemminger 2020-03-23 17:02:12 UTC
What is your application?

What is the protocol?

Why not use perf top (modern kernel profiling).


netlink is for control operations (ip link show etc).
Comment 2 Bernat Arlandis 2020-03-23 17:54:23 UTC
> What is your application?

The application is a racing game, rFactor 2, running on Proton (a Wine special version).

> What is the protocol?

I don't know about the protocol, it's the game's networking code.

> Why not use perf top (modern kernel profiling).

I didn't know about perf top. I'm relatively new to this kind of tasks.

> netlink is for control operations (ip link show etc).

What do you mean? Those netlink functions are called inside the sendto function in the kernel. Or maybe I'm missing something.

I can investigate more as I gather more information.
Comment 3 Stephen Hemminger 2020-03-24 15:56:47 UTC
When dealing with an unknown application, looking at what system calls are being made (with strace) can help. It can be anything; like a Wine doing something to emulate Windows behaviour.

Bottom line, with out a specific Linux kernel indication, this is not the right place to get a resolution.
Comment 4 Bernat Arlandis 2020-03-24 16:03:29 UTC
Ok. Sorry, I thought the profiling session showed something weird. I'll keep investigating.

Thanks for the answer.

Note You need to log in before you can comment on or make changes to this bug.