Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 41
  1. #31
    Untangle Ninja Jim.Alles's Avatar
    Join Date
    Jul 2008
    Location
    Central PA
    Posts
    1,415

    Default

    that doesn't look good.

    Untangle Next Generation FW???

    donhwyo likes this.

  2. #32
    Master Untangler
    Join Date
    Aug 2016
    Posts
    106

    Default

    I will add:

    echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    I did discover that for my J1900 appliance it was set to "powersave".

    I was wondering why I could never see more that 1600 Mhz out of my 2K CPU.

    I was able to change it to "performance" where I was finally seeing 2K+.

    I do not think I really saw any "perceived" benefit, but I learned something.
    Untangle 13.0.0 - Clean Install
    QOTOM-Q190G4N
    J1900 (2GHz Intel Celeron), 128GB SSD mSATA, 4GB RAM DDR3L, 4 xRJ-45 Intel I211AT 10/100/1000 Controller

  3. #33
    Untangler
    Join Date
    Oct 2016
    Posts
    38

    Default

    This is my best so far , using built in qos for my dual port nic has htb on eth0 which seems to use virtual memory, untangle always by default using netstat -s not enough buffer not matter how large, so I toned down the buffers for my speed and good latency, then turned up vm_dirty, and the vm_overcommit ratio and now I never have packets reduced in queue for low socket buffer. I tried everthing to solve low socket buffer but this is the fix.
    echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
    echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
    echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
    echo 1 > /proc/sys/kernel/numa_balancing
    echo 65 > /proc/sys/vm/overcommit_ratio
    sysctl kernel.shmmax=4294967295
    sysctl kernel.shmall=262144
    sysctl net.ipv4.tcp_max_orphans=1000
    sysctl net.ipv4.tcp_max_tw_buckets=65536
    sysctl kernel.msgmax=65536
    sysctl kernel.msgmnb=65536
    sysctl net.ipv4.tcp_no_metrics_save=1
    sysctl net.core.somaxconn=256
    sysctl net.core.wmem_max=1342177280
    sysctl net.core.rmem_max=1342177280
    sysctl net.ipv4.udp_wmem_min=131072
    sysctl net.ipv4.udp_rmem_min=131072
    sysctl net.ipv4.udp_mem='8192 131072 281600'
    sysctl net.core.rmem_default=32768
    sysctl net.core.wmem_default=32768
    sysctl net.ipv4.tcp_mem='536870912 1073741824 2147483648'
    sysctl net.ipv4.tcp_rmem='4096 32768 131072'
    sysctl net.ipv4.tcp_wmem='4096 32768 87380'
    sysctl net.core.optmem_max=512000
    sysctl net.ipv4.ip_local_port_range='1 66000'
    sysctl net.core.netdev_max_backlog=256
    sysctl net.ipv4.tcp_max_syn_backlog=256
    sysctl net.ipv4.tcp_dsack=1
    sysctl net.ipv4.tcp_tw_recycle=1
    sysctl net.ipv4.tcp_adv_win_scale=2
    sysctl net.ipv4.tcp_low_latency=1
    sysctl net.ipv4.tcp_reordering=4
    echo 50 > /proc/sys/vm/dirty_ratio
    ulimit -n 500000
    echo 1000000 > /proc/sys/fs/file-max
    Last edited by abailey10; 03-27-2017 at 01:44 AM.

  4. #34
    Untangler
    Join Date
    Oct 2016
    Posts
    38

    Default

    Funny cause I did it and it didn't break a thing , I know you try to discourage people from experimenting , but instead should be encouraging. For a home connection up to 70mb down 5up , my config blows defaults out of the water.

  5. #35
    Master Untangler
    Join Date
    May 2008
    Posts
    529

    Default

    Thanks for posting your code. If you document it a bit it would be helpful not only to us but yourself.

    Quote Originally Posted by abailey10 View Post
    Funny cause I did it and it didn't break a thing , I know you try to discourage people from experimenting , but instead should be encouraging. For a home connection up to 70mb down 5up , my config blows defaults out of the water.
    I hope that comment wasn't aimed at me, I have been hacking at Untangle since version 5. I only posted the result of one of your suggestions that looks suspicious. Meaning I did try you suggestion.

    Code:
    echo ondemand >| /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    zsh: no such file or directory: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    This error is because the cpu does not have cpufreq so wont apply to all.

    Here is some code I use to do the same sort of thing you are trying. I welcome comments and warn that I don't know everything. I am sure there are mistakes in it. Use at your own risk.

    Code:
    #!/bin/sh
    
    # next 4 lines from https://forums.untangle.com/hacks/38059-keep-nic-tuning-after-reboots-untangle-12-2-a-3.html#post212824
    #echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor #cannot create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Directory nonexistent
    #echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
    #echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
    #echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
    
    ####
    #sysctl net.ipv4.tcp_max_orphans=4096
    #sysctl kernel.shmmax=250000000
    #sysctl kernel.shmall=2500000
    #sysctl net.ipv4.tcp_max_tw_buckets=65536
    #sysctl kernel.msgmax=131070
    #sysctl kernel.msgmnb=65536
    #sysctl net.ipv4.tcp_no_metrics_save=1
    #sysctl net.core.wmem_max=1256243200
    #sysctl net.core.rmem_max=1256243200
    #sysctl net.ipv4.udp_wmem_min=512000
    #sysctl net.ipv4.udp_rmem_min=16384
    #sysctl net.ipv4.udp_mem='16384 512000 2097152'
    #sysctl net.core.rmem_default=73728
    #sysctl net.core.wmem_default=258048
    #sysctl net.ipv4.tcp_mem='1256243200 1256243200 1256243200'
    #sysctl net.ipv4.tcp_rmem='16384 73728 258048'
    #sysctl net.ipv4.tcp_wmem='65536 258048 2097152'
    #sysctl net.ipv4.neigh.default.proxy_delay=30
    #sysctl net.ipv4.tcp_max_syn_backlog=512
    #sysctl net.core.netdev_max_backlog=5000
    #sysctl net.core.optmem_max=262140
    #sysctl net.ipv4.ip_local_port_range='1024 65535'
    ####
    
    modprobe ifb
    modprobe sch_fq_codel
    modprobe act_mirred
    
    ethtool -G eth0 tx 64 rx 64 # rx 64
    ethtool -G eth1 tx 64 rx 64 # rx 64
    ifconfig eth0 txqueuelen 500 # 0 500 from https://forums.untangle.com/hacks/38059-keep-nic-tuning-after-reboots-untangle-12-2-a-3.html#post212824
    ifconfig eth1 txqueuelen 500 # 0 500 from https://forums.untangle.com/hacks/38059-keep-nic-tuning-after-reboots-untangle-12-2-a-3.html#post212824
    tc qdisc replace dev eth0 root fq_codel
    tc qdisc replace dev eth1 root fq_codel
    
    ethtool -G tun0 tx 64 rx 64 # rx 64
    ethtool -G tun1 tx 64 rx 64 # rx 64
    ethtool -G utun tx 64 rx 64 # rx 64
    
    ifconfig tun0 txqueuelen 0
    ifconfig tun1 txqueuelen 0
    ifconfig utun txqueuelen 0
    
    tc qdisc replace dev tun0 root fq_codel
    tc qdisc replace dev tun1 root fq_codel
    tc qdisc replace dev utun root fq_codel
    
    
    ## https://wiki.gentoo.org/wiki/Traffic_shaping
    ## Paths and definitions
    tc=/sbin/tc
    ext=eth0                # Change for your device!
    ext_ingress=ifb0        # Use a unique ifb per rate limiter!
                            # Set these as per your provider's settings, at 90% to start with
    ext_up=4000kbit         # Max theoretical: for this example, up is 1024kbit
    ext_down=50500kbit      # Max theoretical: for this example, down is 8192kbit
    q=1514                  # HTB Quantum = 1500bytes IP + 14 bytes ethernet.
                            # Higher bandwidths may require a higher htb quantum. MEASURE.
                            # Some ADSL devices might require a stab setting.
    
    quantum=300             # fq_codel quantum 300 gives a boost to interactive flows
                            # At higher bandwidths (50Mbit+) don't bother
    
    
    modprobe ifb
    modprobe sch_fq_codel
    modprobe act_mirred
    
    ethtool -K $ext tso off gso off gro off # Also turn of gro on ALL interfaces
                                            # e.g ethtool -K eth1 gro off if you have eth1
                                            # some devices you may need to run these
                                            # commands independently
    
    #ethtool -K eth1 tso off gso off gro off
    #ethtool -K eth1.10 tso off gso off gro off
    #ethtool -K tun0 tso off gso off gro off
    #ethtool -K tun1 tso off gso off gro off
    #ethtool -K $ext tso off gso off gro off
    
    # Clear old queuing disciplines (qdisc) on the interfaces
    $tc qdisc del dev $ext root
    $tc qdisc del dev $ext ingress
    $tc qdisc del dev $ext_ingress root
    $tc qdisc del dev $ext_ingress ingress
    
    #########
    # INGRESS
    #########
    
    # Create ingress on external interface
    $tc qdisc add dev $ext handle ffff: ingress
    
    ifconfig $ext_ingress up # if the interace is not up bad things happen
    
    # Forward all ingress traffic to the IFB device
    $tc filter add dev $ext parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev $ext_ingress
    
    # Create an EGRESS filter on the IFB device
    $tc qdisc add dev $ext_ingress root handle 1: htb default 11
    
    # Add root class HTB with rate limiting
    
    $tc class add dev $ext_ingress parent 1: classid 1:1 htb rate $ext_down
    $tc class add dev $ext_ingress parent 1:1 classid 1:11 htb rate $ext_down prio 0 quantum $q
    
    
    # Add FQ_CODEL qdisc with ECN support (if you want ecn)
    $tc qdisc add dev $ext_ingress parent 1:11 fq_codel  ecn
    
    #########
    # EGRESS
    #########
    # Add FQ_CODEL to EGRESS on external interface
    $tc qdisc add dev $ext root handle 1: htb default 11
    
    # Add root class HTB with rate limiting
    $tc class add dev $ext parent 1: classid 1:1 htb rate $ext_up
    $tc class add dev $ext parent 1:1 classid 1:11 htb rate $ext_up prio 0 quantum $q
    
    # Note: You can apply a packet limit here and on ingress if you are memory constrained - e.g
    # for low bandwidths and machines with < 64MB of ram, limit 1000 is good, otherwise no point
    
    # Add FQ_CODEL qdisc without ECN support - on egress it's generally better to just drop the packet
    # but feel free to enable it if you want.
    
    $tc qdisc add dev $ext parent 1:11 fq_codel  noecn
    
    # service networking restart
    
    exit 0
    FQ_CODEL will be coming in version 13 I hear.

    I run this from rc.local. Not the best way but it works. Also qos is off, it is handled in the code above.

  6. #36
    Untangle Ninja Jim.Alles's Avatar
    Join Date
    Jul 2008
    Location
    Central PA
    Posts
    1,415

    Default

    Here is some code I use to do the same sort of thing you are trying. I welcome comments and warn that I don't know everything. I am sure there are mistakes in it. Use at your own risk.
    Thank You

  7. #37
    Master Untangler
    Join Date
    Aug 2016
    Posts
    106

    Default

    Via DSL Reports I drop to BDA with this new code fq_codel code.

    I have a feeling that this code and Untangle are bumping into each other or something.

    Vanillay Untangle I get BDA.
    Vanilla Untangle WITH QoS ... I get ABA.

    Thus far I have never gotten an A on Buffer Bloat.

    I am eager for version 13!
    Untangle 13.0.0 - Clean Install
    QOTOM-Q190G4N
    J1900 (2GHz Intel Celeron), 128GB SSD mSATA, 4GB RAM DDR3L, 4 xRJ-45 Intel I211AT 10/100/1000 Controller

  8. #38
    Master Untangler
    Join Date
    May 2008
    Posts
    529

    Default

    Buffer bloat is an art not a science. My isp is terrible, speed goes up and down all the time. This code helps a lot. When the speed is hi I often get A for buffer bloat. When speeds are low I get C or D. Without it I always get F even with qos on. It is very noticeable when watching 720 0r 1080 video streams. With just qos it buffers and stutters all the time. With the script it plays well, only buffering when the isp is almost unusable. Your mileage may vary.

    The script sets speeds here.
    Code:
    ext=eth0                # Change for your device!
    ext_ingress=ifb0        # Use a unique ifb per rate limiter!
                            # Set these as per your provider's settings, at 90% to start with
    ext_up=4000kbit         # Max theoretical: for this example, up is 1024kbit
    ext_down=50500kbit      # Max theoretical: for this example, down is 8192kbit
    q=1514
    It would be nice if it did that on the fly in real time for poor isp's. Those values are about 80% of average and 500% of worst case.

    Having it in 13 will be a real help. As is it only runs on boot, with there version it will start after settings changes or whatever.

    Looking forward to 13!

    http://www.dslreports.com/speedtest/12912669 even with sub par spped.
    Last edited by donhwyo; 03-30-2017 at 10:32 AM. Reason: add speed test result

  9. #39
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    16,024

    Default

    Variable speed is tough.
    You either set your QoS to the slightly less than the minimum amount you get (which sucks to do) or Untangle cant help you.
    Because when your actual speed is below whatever happen is configured in QoS then the queueing will happen on the (dumb) modem again.
    https://wiki.untangle.com/images/4/4..._diagram_4.png

    Its not so much an art as its just a property of the whole chain. The two most important systems (the "modem" and the "modem" at the other end) you usually have no control over. That makes it feel mysterious and like "art" is that you're playing with a bunch of variables on systems that ultimately don't really matter much as thats not where the buffering is occurring.

    also keep in mind that dslreports is a very quick test with not enough datapoints and so it will often change one run to the next. A more accurate test is to just run a ping and then download a very large file and let it run for a full 5 minutes and then check the average ping, then subtract the average ping you get when no other activity is going on in the network.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  10. #40
    Master Untangler
    Join Date
    May 2008
    Posts
    529

    Default

    Well all I can do is try to keep from overloading the modem, and it seems to help a lot. Maybe the isp can find some newer stuff on ebay and upgrade someday. They upgraded to docsys2 long after 3 was out. Maybe when 4 or 5 come out we will get 3. The joys of living in rural America.

    Thanks again for getting Untangle up to date. Any more rumors about 13?

Page 4 of 5 FirstFirst ... 2345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2