What's new

Cannot change rmem_max

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

exoxon

Occasional Visitor
Is it not possible to change rmem_max permanently via nano /jffs/scripts/init-start (echo *value* > /proc/sys/net/core/rmem_max)? Every change i made in here survives reboot, except this one goes back and back again to 2500000.
Is there another way to change this value?
 
Maybe the firmware changes it itself during boot. Try to make the change happen later during the boot process.
 
Try services-start instead, so it won`t be executed every time there is a router service event occuring.
 
Yes i am! why on earth AGH changes that?
No idea. Maybe ask the person that created the installer script. @SomeWhereOverTheRainBow ?

Code:
proc_optimizations () {
  { printf "4194304" > /proc/sys/kernel/pid_max; }; # Ensure max PID coverage
  { printf "2" > /proc/sys/vm/overcommit_memory; }; # Ensure ratio algorithm checks properly work including swap.
  { printf "2500000" > /proc/sys/net/core/rmem_max; }; # Ensure UDP receive buffer set to 2.5M.
  { printf "0" > /proc/sys/net/ipv4/icmp_ratelimit; }; # Ensure Control over MTRS
  { printf "256" > /proc/sys/net/ipv4/neigh/default/gc_thresh1; }; # Increase ARP cache sizes and GC thresholds
  { printf "1024" > /proc/sys/net/ipv4/neigh/default/gc_thresh2; }; # Increase ARP cache sizes and GC thresholds
  { printf "2048" > /proc/sys/net/ipv4/neigh/default/gc_thresh3; }; # Increase ARP cache sizes and GC thresholds
  { printf "240" > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_max_retrans; }; # Lower conntrack tcp_timeout_max_retrans from 300 to 240
  if [ -n "$(nvram get ipv6_service)" ]; then #IPV6 proc variants
    { printf "0" > /proc/sys/net/ipv6/icmp/ratelimit; };
    { printf "256" > /proc/sys/net/ipv6/neigh/default/gc_thresh1; };
    { printf "1024" > /proc/sys/net/ipv6/neigh/default/gc_thresh2; };
    { printf "2048" > /proc/sys/net/ipv6/neigh/default/gc_thresh3; };
  fi;
}
 
No idea. Maybe ask the person that created the installer script. @SomeWhereOverTheRainBow ?

Code:
proc_optimizations () {
  { printf "4194304" > /proc/sys/kernel/pid_max; }; # Ensure max PID coverage
  { printf "2" > /proc/sys/vm/overcommit_memory; }; # Ensure ratio algorithm checks properly work including swap.
  { printf "2500000" > /proc/sys/net/core/rmem_max; }; # Ensure UDP receive buffer set to 2.5M.
  { printf "0" > /proc/sys/net/ipv4/icmp_ratelimit; }; # Ensure Control over MTRS
  { printf "256" > /proc/sys/net/ipv4/neigh/default/gc_thresh1; }; # Increase ARP cache sizes and GC thresholds
  { printf "1024" > /proc/sys/net/ipv4/neigh/default/gc_thresh2; }; # Increase ARP cache sizes and GC thresholds
  { printf "2048" > /proc/sys/net/ipv4/neigh/default/gc_thresh3; }; # Increase ARP cache sizes and GC thresholds
  { printf "240" > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_max_retrans; }; # Lower conntrack tcp_timeout_max_retrans from 300 to 240
  if [ -n "$(nvram get ipv6_service)" ]; then #IPV6 proc variants
    { printf "0" > /proc/sys/net/ipv6/icmp/ratelimit; };
    { printf "256" > /proc/sys/net/ipv6/neigh/default/gc_thresh1; };
    { printf "1024" > /proc/sys/net/ipv6/neigh/default/gc_thresh2; };
    { printf "2048" > /proc/sys/net/ipv6/neigh/default/gc_thresh3; };
  fi;
}
That script shouldn`t blindly write system values without checking first what the current values are. Otherwise, it might override something else that needs different or higher values (like the user does here).
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top