netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* many sockets, slow sendto
@ 2007-03-06 15:08 Zaccomer Lajos
  2007-03-06 18:20 ` Baruch Even
  2007-03-06 19:23 ` Andi Kleen
  0 siblings, 2 replies; 23+ messages in thread
From: Zaccomer Lajos @ 2007-03-06 15:08 UTC (permalink / raw)
  To: netdev

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
  

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-04-30 19:59 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 15:08 many sockets, slow sendto Zaccomer Lajos
2007-03-06 18:20 ` 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

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).