r103860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103859‎ | r103860 | r103861 >
Date:22:59, 21 November 2011
Author:asher
Status:resolved
Tags:
Comment:
set udp2log recv-queue to up to 128k based on rmem_max
Modified paths:
  • /trunk/udplog/debian/changelog (modified) (history)
  • /trunk/udplog/debian/udp2log.init (modified) (history)

Diff [purge]

Index: trunk/udplog/debian/changelog
@@ -1,3 +1,9 @@
 2+udplog (1.8-2) lucid; urgency=low
 3+
 4+ * init script sets recv-queue to up to 128k based on rmem_max
 5+
 6+ -- Asher Feldman <afeldman@wikimedia.org> Mon, 21 Nov 2011 24:00:00 +0000
 7+
28 udplog (1.8-1) lucid; urgency=low
39
410 * Added a non-blocking write mode. Not recommended for use at this time.
Index: trunk/udplog/debian/udp2log.init
@@ -22,6 +22,16 @@
2323 SCRIPTNAME=/etc/init.d/$NAME
2424 CONFFILE=/etc/udp2log
2525
 26+if [ -f /proc/sys/net/core/rmem_max ] ; then
 27+ rmax=$(cat /proc/sys/net/core/rmem_max)
 28+ if [ $rmax -ge 134217728 ] ; then
 29+ queue=131072
 30+ else
 31+ queue=$((queue/1024))
 32+ fi
 33+ $DAEMON_ARGS="$DAEMON_ARGS --recv-queue=$queue"
 34+fi
 35+
2636 # Exit if the package is not installed
2737 [ -x "$DAEMON" ] || exit 0
2838

Follow-up revisions

RevisionCommit summaryAuthorDate
r103875bad bad dollar signasher23:55, 21 November 2011

Status & tagging log