netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Performance issue due to constant "modprobes"
@ 2011-04-07 23:16 Ed W
  2011-04-08  0:18 ` Jan Engelhardt
  2011-04-08  0:47 ` Maciej Żenczykowski
  0 siblings, 2 replies; 33+ messages in thread
From: Ed W @ 2011-04-07 23:16 UTC (permalink / raw)
  To: netfilter-devel

Hi, I am using a relatively low powered (embedded) platform and I have a
significant performance problem due to slow "modprobe" performance.

I have my kernel compiled without modules.  My modprobe takes a little
under 1ms to execute.  "iptables" appears to try and modprobe some 21
match/target modules.  As a result, even "iptables -h" takes around 14ms
to run.  This is adding some substantial time to my firewall setup time
(hacking out the modprobes reduces run time from the 14ms to near zero,
ie it's 90+% of my runtime)

I have dug through the code a bit and the first thing I notice is that
there is no --modprobe option actually parsed for, and the undocumented
"-M" option doesn't appear to pass through to xtables.c? (I thought
about simply lying about the modprobe binary name)

My next thought was to collect all the modprobes and run them with a
single execution (modprobe -a). However, it's not clear to me whether
it's important that the modprobe occurs in the middle of xtables.c /
compatible_revision() ?

The final thought is whether it's possible to notice that a module is
already loaded and skip the modprobe call altogether? (/proc/modules is
not enough because the module could be built into the kernel)

Does someone have any ideas on how I can finesse these constant (and
expensive in my case) modprobes each time we run the iptables command?

Thanks

Ed W

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

end of thread, other threads:[~2011-04-20  8:54 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 23:16 Performance issue due to constant "modprobes" Ed W
2011-04-08  0:18 ` Jan Engelhardt
2011-04-08 17:11   ` Ed W
2011-04-08  0:47 ` Maciej Żenczykowski
2011-04-08 17:11   ` Ed W
2011-04-08 19:54     ` Jan Engelhardt
2011-04-08 23:22       ` Ed W
2011-04-08 23:42         ` Jan Engelhardt
2011-04-09 20:39           ` Ed W
2011-04-09 22:30             ` Jan Engelhardt
2011-04-12 21:03               ` Ed W
2011-04-12 22:05                 ` Jan Engelhardt
2011-04-13 11:08                   ` Ed W
2011-04-13 12:06                     ` Jan Engelhardt
2011-04-13  9:10               ` Maciej Żenczykowski
2011-04-13 11:35                 ` Ed W
2011-04-13 12:13                   ` Jan Engelhardt
2011-04-13 12:35                     ` Ed W
2011-04-13 12:45                       ` Jan Engelhardt
2011-04-13 16:45                         ` Ed W
2011-04-13 19:20                           ` Mr Dash Four
2011-04-14  7:07                           ` Maciej Żenczykowski
2011-04-14  7:13                             ` Maciej Żenczykowski
2011-04-14  7:19                               ` Jan Engelhardt
2011-04-18 13:38                                 ` Patrick McHardy
2011-04-18 16:33                               ` Ed W
2011-04-19  1:12                                 ` Maciej Żenczykowski
2011-04-19  9:03                                   ` Maciej Żenczykowski
2011-04-19 16:10                                     ` Ed W
2011-04-20  1:26                                       ` Maciej Żenczykowski
2011-04-20  6:41                                         ` Maciej Żenczykowski
2011-04-20  7:31                                           ` Jozsef Kadlecsik
2011-04-20  8:54                                             ` Ed W

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