summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-09-23 10:49:56 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-09-23 10:49:56 +0000
commit1816a672cc35d7711ba2b9acd74e0e09e8fcf9f1 (patch)
tree2abe8c2f9a4d6570f5c9fb5db71914d81875a4f6 /usr.sbin/snmpd
parentd69b908469935164394629f269f322e458433ad8 (diff)
tweak the mclgeti algorithm to behave better under load.
instead of letting hardware rings grow on every interrupt, restrict it so it can only grow once per softclock tick. we can only punish the rings on softclock ticks, so it make sense to only grow on softclock tick boundaries too. the rings are now punished after >1 lost softclock tick rather than >2. mclgeti is now more aggressive at detecting livelock. the rings get punished by an 8th, rather than by half. we now allow the rings to be punished again even if the system is already considered in livelock. without this diff a livelocked system will have its rx ring sizes scale up and down very rapidly, while holding the rings low for too long. this affected throughput significantly. discussed and tested heavily at j2k10. there are still some games with softnet we can play, but this is a good first step. "put it in" and ok deraadt@ ok claudio@ krw@ henning@ mcbride@ if we find out that it sucks we can pull it out again later. till then we'll run with it and see how it goes.
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/mib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index 86420d5e316..9f0b743b8ca 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.41 2010/09/20 16:29:51 sthen Exp $ */
+/* $OpenBSD: mib.c,v 1.42 2010/09/23 10:49:55 dlg Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -1428,8 +1428,7 @@ mib_memiftable(struct oid *oid, struct ber_oid *o, struct ber_element **elm)
ber = ber_add_string(ber, kif->if_name);
break;
case 2:
- ber = ber_add_integer(ber, kif->if_data.ifi_livelocks);
- ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER64);
+ ber = ber_add_string(ber, 0);
break;
default:
return (-1);