From: "Zaccomer Lajos" <zacco@fw.hu>
To: netdev@vger.kernel.org
Subject: many sockets, slow sendto
Date: Tue, 06 Mar 2007 16:08:38 +0100 [thread overview]
Message-ID: <E1HObHK-0000WB-00@osiris.swi.hu> (raw)
Hi,
I'm playing around with a simulation, in which many thousands of IP
addresses (on interface aliases) are used to send/receive TCP/UDP
packets. I noticed that the time of send/sendto increased linearly
with the number of file descriptors, and I found it rather strange.
I
searched for some related topics, but I couldn't find any (I might
have chosen the wrong keywords).
Though, I'm a real kernelnewbie, I made up my mind to follow what is
happening in the deep. I used the printk and do_gettimeofday
functions to print timestamps at certain points of the execution
path
to identify the bottleneck. Each socket is bound to a dedicated IP
address and each socket is using the very same port number, with the
help of SO_REUSEADDR socket option. I use the 2.16.19-r5
gentoo-sources on my Compaq Evo N1020v laptop. So far, I could get
to
the following point:
Function/macro: Location:
sys_send net/socket.c
sys_sendto net/socket.c
sock_sendmsg net/socket.c
__sock_sendmsg net/socket.c
(*socket_sendmsg)=inet_sendmsg net/ipv4/af_inet.c
(*sendmsg)=udp_sendmsg net/ipv4/udp.c
udp_push_pending_frames net/ipv4/udp.c
ip_push_pending_frames net/ipv4/ip_output.c
NF_HOOK include/linux/netfilter.h
ip_output net/ipv4/ip_output.c
ip_finish_output net/ipv4/ip_output.c
ip_finish_output2 net/ipv4/ip_output.c
dst->heighbour->output=dev_queue_xmit net/core/dev.c
rcu_read_unlock_bh include/linux/rcupdate.c
local_bh_enable kernel/softirq.c
At this point, I felt really helpless, and I don't even know if I'm
at the right track in this investigation. So, can someone please
help me with advice or links pointing to the info I need? Let me
know
if you need any further input.
I expect that sending a packet should not depend on the number of
file descriptors (sockets), it should be a more or less constant
time
operation. Can you confirm this, or is there something in the kernel
or elsewhere preventing it?
Any hints are welcome. Thanks a lot!
/Zacco
_____________________________________________________________________
50Mbyte kereskedelmi webtárhely + korlátlan számú e-mail + php + sql
havi 1,365 Ft-ért! Bővebben: http://www.swi.hu
next reply other threads:[~2007-03-06 15:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 15:08 Zaccomer Lajos [this message]
2007-03-06 18:20 ` many sockets, slow sendto Baruch Even
2007-03-19 23:10 ` Zacco
2007-03-19 23:16 ` David Miller
2007-03-20 21:59 ` Zacco
2007-03-20 22:48 ` Eric Dumazet
2007-03-21 21:53 ` Zacco
2007-03-21 22:24 ` Eric Dumazet
2007-03-21 23:26 ` Eric Dumazet
2007-03-22 1:14 ` David Miller
2007-03-21 22:12 ` Eric Dumazet
2007-03-22 1:15 ` David Miller
2007-03-22 6:43 ` Eric Dumazet
2007-03-29 19:24 ` Zacco
2007-03-30 13:10 ` Eric Dumazet
2007-04-22 12:34 ` Zacco
2007-04-30 7:26 ` David Miller
2007-04-30 10:56 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-30 12:47 ` Eric Dumazet
2007-04-30 19:43 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-30 19:59 ` Eric Dumazet
2007-03-06 19:23 ` Andi Kleen
2007-03-06 21:28 ` Zacco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1HObHK-0000WB-00@osiris.swi.hu \
--to=zacco@fw.hu \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).