Browse Source

gluon-core: limit fq_codel memory to 1MB per AP with less than 48MB RAM (#1046)

Christof Schulze 7 years ago
parent
commit
b7651ee96f

+ 8 - 0
package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage

@@ -0,0 +1,8 @@
+#!/bin/sh
+if [ "${ACTION}" = "add" ]; then
+
+	RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
+	if [ "$RAM" -lt $((48*1024)) ]; then
+		echo "fq_memory_limit 1048576" > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm"
+	fi
+fi