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 -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ