Skip to content

Instantly share code, notes, and snippets.

@nerdegem
Created January 31, 2023 21:20
Show Gist options
  • Select an option

  • Save nerdegem/47b54b25e095cc6d2d34ed5e94ec7bc6 to your computer and use it in GitHub Desktop.

Select an option

Save nerdegem/47b54b25e095cc6d2d34ed5e94ec7bc6 to your computer and use it in GitHub Desktop.
https://github.com/tvheadend/tvheadend/pull/1212/files
src/input/mpegts/iptv/iptv_private.h
#include "udp.h"
#include "tvhpoll.h"
#define IPTV_BUF_SIZE (300*188)
#define IPTV_PKTS 32
#define IPTV_BUF_SIZE (9000*188)
#define IPTV_PKTS 128
#define IPTV_PKT_PAYLOAD 1472
###################
src/parsers/parsers.c
typedef struct iptv_input iptv_input_t;
goto deliver;
}
diff = st->es_type == SCT_DVBSUB ? 8*90000 : 6*90000;
diff = st->es_type == SCT_DVBSUB ? 32*90000 : 24*90000;
d = pts_diff(pkt->pkt_pcr, (pkt->pkt_dts + 30000) & PTS_MASK);
if (d > diff || d == PTS_UNSET) {
##################
https://community.getchannels.com/t/tuning-my-setup-to-remove-stalls-pixelation-tvheadend-uk-freesat-channels-sat-ip/25674
/etc/sysctl.conf
# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
# Reboot 20 seconds after a kernel panic
kernel.panic = 20
# Even out the writes, to prevent periods of heavy IO
vm.dirty_background_bytes=16777216
vm.dirty_bytes=33554432
# We don't want to swap
vm.swappiness=0
# Tune the buffers (UDP and TCP) and increase default starting point for a gigabit network
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.udp_mem = 8388608 12582912 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 87380 16777216
net.ipv4.udp_rmem_min = 32768
net.ipv4.udp_wmem_min = 32768
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_slow_start_after_idle = 0
# Not strictly necessary, but is part of my 'default' config tuning, assymetric routing is not a problem in this environment
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
# <3 TCP BBR / FQ, this is another topic entirely
net.ipv4.tcp_congestion_control=bbr
net.core.default_qdisc=fq
# Increase the backlog, max conns, file inotify limit these perhaps ARE overly aggressive for the environment but provides no detremental impact for me
net.core.netdev_max_backlog = 2500
net.core.somaxconn = 65000
fs.inotify.max_user_watches=524288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment