Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

When people stream from my plex box.. my whole internet gets online ping spikes... any ideas?

exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass

Did some research:

  • "There is another post with similar issues and it turned out to be the Plex DLNA server causing the problem. "

That didn't help though.

ping spikes even to www.google.com here

I verified it was plex too.. any ideas?

Best Answers

«1

Answers

  • tootsmcgeetootsmcgee Members, Plex Pass Posts: 256 Plex Pass

    Are people streaming on your LAN, or is the traffic going out your WAN?

  • kegobeer-plexkegobeer-plex Members, Plex Pass Posts: 4,835 Plex Pass

    Well, if your outbound data rate is 5mb or less, and you have no outbound throttling and your users are using up a lot of the available bandwidth, then you will see high ping rates like that.

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass

    Nah it's not people in my LAN. Outside of my network. Different states, etc.

    My speeds are fast: http://www.speedtest.net/my-result/5092383779

    I don't know what the dealio is?

    Where do I manage outbound throttling?

  • hthighwayhthighway Members, Plex Pass, Plex Ninja Posts: 6,429 Plex Ninja

    @exzacklyright said:
    Where do I manage outbound throttling?

    There is no where, inside of plex, to manage it.
    The stream setting is set by each client, not the server.

  • hthighwayhthighway Members, Plex Pass, Plex Ninja Posts: 6,429 Plex Ninja

    You can install a third party app, like PlexPY, to monitor who,what,when, and at what bitrate remote users are streaming.

  • kegobeer-plexkegobeer-plex Members, Plex Pass Posts: 4,835 Plex Pass

    Your router should have a QoS setting that can manage how much throughput is allowed for each connection.

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass
    edited February 2016

    @hthighway said:
    You can install a third party app, like PlexPY, to monitor who,what,when, and at what bitrate remote users are streaming.

    I have PlexPY installed. I don't see where it shows a users bitrate though...

    @kegobeer-plex said:
    Your router should have a QoS setting that can manage how much throughput is allowed for each connection.

    Seems as though the Verizon Quantum router actually doesn't have QoS.

  • kegobeer-plexkegobeer-plex Members, Plex Pass Posts: 4,835 Plex Pass

    Yes, you would limit the upload/download for the Plex server computer.

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass

    Well what should I ask my friends to limit their settings to?

  • hthighwayhthighway Members, Plex Pass, Plex Ninja Posts: 6,429 Plex Ninja
    edited February 2016

    @exzacklyright said:
    Well what should I ask my friends to limit their settings to?

    That depends on the number of friends that will be concurrently watching and how many simultaneous transcoded sessions your server can handle. As well at the bitrate of them media...

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass
    edited February 2016

    well my friend had it set to 720p 4mbps... and it was lagging the server. Which makes no sense.

    I have 80 down / 80 upload so it should be plenty?!

    CPU usage only hovers around 40-50%

  • tootsmcgeetootsmcgee Members, Plex Pass Posts: 256 Plex Pass
    edited February 2016

    If you are running on a FreeBSD box that isn't doing much else, you could also try using ipfw/dummynet to bandwidth throttle (probably more complicated with FreeNAS...dunno) the outbound traffic on the box itself:

    ipfw pipe 1 config bw 20Mbit/s
    ipfw queue 1 config pipe 1 mask dst-ip 0xffffffff
    # adjust ip block as necessary to not throttle your own LAN
    ipfw add 100 queue 1 tcp from me 32400 to not 192.168.0.0/16 out
    

    That /should/ limit the max bandwidth that external people (cumulatively) could stream from your box from the plex port, to no more than 20Mbit/s. If more than one person streams at once, everyone shares that 20Mbit equally. Adjust as desired.

    more info about general ipfw setup/config here

  • gbooker02gbooker02 Members, Plex Employee, Plex Pass, Plex Ninja Posts: 546 Plex Employee

    It appears you can use ipfw within a jail. So, if you have Plex running inside its own jail, it looks like you can restrict it without affecting others.

    BTW, on the second line, shouldn't it be restricted to traffic from port 32400? Or perhaps another rule to exclude traffic not from port 32400?

  • tootsmcgeetootsmcgee Members, Plex Pass Posts: 256 Plex Pass

    The second line just sets up the queue, and the mask dst-ip just means each dest ip will get what is effectively a dynamically generated clone of the queue, but still a member of the same pipe.

    So you end up with many queues sharing the same pipe, which is how you get a total max of 20mbps, and equal sharing amongst all participants. The fourth line (after comment line) matches traffic in one direction (the out/return traffic that comes from port 32400) and stuffs it into the queue. No other traffic should be originating from tcp port 32400, since plex is bound to that port. hmm. Maybe adding the loopback network just to be safe would make sense. {not 192.168.0.0/16 and not 127.0.0.0/8}. Not sure if that syntax is valid, or if it would be better to simply have another rule matching loopback right above it with a skip to bypass this rule. My ipfw experience is a bit limited to simple things, but dummynet is pretty sweet!

    I think ipfw inside a jail requires VMNET/VIMAGE support, which I believe FreeNAS includes in their kernel by default. So that could indeed be a reasonable option.

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass
    edited February 2016

    I did something like this:

    Enable dummynet and ipfw the FreeBSD traffic shaping module:
    edit /boot/loader.conf and add
    **ipfw_load="YES"
    dummynet_load="YES"

    run kldload dummynet to load the modules or just restart the server.
    Set up a pipe that restricts traffic
    ipfw pipe 1 config bw 10000Kbps
    Send outgoing traffic destined for anywhere other than the local network through the pipe
    ipfw add pipe 1 ip from 192.168.1.226 to 192.168.1.226
    systat -ifstat 1 is used to monitor bandwidth

    You can see your pipes with ipfw pipe show (just as you see the regular rules with ipfw show.

    I mean it appears to work.. My pms server jail IP is 192.168.1.226

    maybe your solution would be better though?

  • tootsmcgeetootsmcgee Members, Plex Pass Posts: 256 Plex Pass
    ipfw add pipe 1 ip from 192.168.1.226 to 192.168.1.226
    

    That seems like a weird rule, or was there just a typo when you input it into the forum here?

  • exzacklyrightexzacklyright Members, Plex Pass Posts: 30 Plex Pass
    edited February 2016

    Here's some links I was looking at:

    http://info.iet.unipi.it/~luigi/dummynet/
    http://info.iet.unipi.it/~luigi/ip_dummynet/original.html
    http://cs.baylor.edu/~donahoo/tools/dummy/tutorial.htm

    The 2nd link has the to/from command.

    I'm really clueless as what would be the best way to go about this though.

    Some of the commands literally crashed FreeNAS though.

«1
Sign In or Register to comment.