Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video playback breaking after optimization #17

Closed
rugabunda opened this issue Apr 13, 2023 · 17 comments
Closed

Video playback breaking after optimization #17

rugabunda opened this issue Apr 13, 2023 · 17 comments

Comments

@rugabunda
Copy link

rugabunda commented Apr 13, 2023

I noticed a massive improvement of browsing and upload/download after this amazing tweak, however,

Youtube, rumble, and bitchute videos will stop playing randomly, and need to be reloaded in order to continue playback. Is there some connection keepalive that has been disabled or modified?

@MysticFoxDE
Copy link
Owner

Hi @rugabunda,

are you using windows 10?
And yes, there are actually problems with some Windows 10 systems because the MinRTO setting of their DatacenterCustom profile is set too low by default and cannot be changed. 🤮

So I just revised my script. Since version 2.01 it no longer "switches" to DatacenterCustom, but simply applies the optimizations to the default Internet profile. 😁

Try it out and please let me know if it fixed your problem, thanks.

Best Regards from Germany
Alex

@EvilOlaf
Copy link
Contributor

Should default settings restored before applying can this update simply applied over already adjusted settings by an earlier script version?

Cheers

@MysticFoxDE
Copy link
Owner

MysticFoxDE commented Apr 13, 2023

Hi @EvilOlaf,

Should default settings restored before applying can this update simply applied over already adjusted settings by an earlier script version?

no, you don't have to reset anything beforehand, the script has been doing that by itself since several versions before any optimization. 😁

In other words, just let it run. 🤪

Best Regards from Germany
Alex

@rugabunda
Copy link
Author

I'm using windows 11 22h2

@rugabunda
Copy link
Author

rugabunda commented Apr 17, 2023

So I assume using DatacenterCustom does not add any benefit at all?

@rugabunda
Copy link
Author

rugabunda commented Apr 17, 2023

Going out on a bit of a limb here, I did remove all restrictions, by making TCPIP parameter "EnableConnectionRateLimiting" to 0, is it possible this could max out the buffer on the NIC?

@rugabunda
Copy link
Author

The problem seems to have lessened over the last few days, I'll continue monitoring it... I did lower my max torrent upload slots significantly, perhaps that had something to do with it.

@rugabunda
Copy link
Author

rugabunda commented Apr 18, 2023

Average weekly torrent upload rate was 1.25 TB prior to your tweak; after tweak it rose to 1.95; Last month's total was 5.35 TB, this month it is 4.15 with almost half a month left to go. Great work!

@MysticFoxDE
Copy link
Owner

Hi @rugabunda,

I'm using windows 11 22h2

then you should switch off the phishing protection activated from Windows 11 22H2 as a test. This consumes a lot of CPU power for any TCP data transfer... 🤢🤮🤮🤮

Procedure see here ...
https://www.elevenforum.com/t/enable-or-disable-microsoft-defender-smartscreen-phishing-protection-windows-11.5721/

So I assume using DatacenterCustom does not add any benefit at all?

Well, after I set the Internet profile from the settings towards the data center profile with the current script, you can now also do without the data center profile. 🤪

Going out on a bit of a limb here, I did remove all restrictions, by making TCPIP parameter "EnableConnectionRateLimiting" to 0, is it possible this could max out the buffer on the NIC?

EnableConnectionRateLimiting ... 😖 ... now I'm slightly confused, this parameter should actually be deactivated since Vista SP2.
I was just doing a little research on this topic and found the following article ...

https://learn.microsoft.com/en-us/answers/questions/495615/how-to-set-to-allow-maximumtcp-connection-in-windo

However, Server 2016 is based on a 1607 kernel, i.e. Windows 10.
OK, it looks like the botch was not deactivated in Vista SP2 after all. 😭

So, thanks for the hint. I will approach/test it in a more targeted way over the next few days and if that really still brings something today, then I will of course also implement this optimization in the script.

Best Regards from Germany
Alex

@rugabunda
Copy link
Author

rugabunda commented Apr 20, 2023

I disable smartscreen system wide through group policy due to its privacy implications, and instead use anti-viruses with the highest ratted 'offline' detection rate, so that shouldn't be a problem...

Yeah most of the articles I found on that TCPIP parameter was ancient, but I did find one source citing its use in Windows 10, so I figured I'd give it a try. https://www.scene.co.za/windows/maximum-unique-tcp-connections-allowed-by-license-in-windows-10/

Thank your time, and please keep us updated on your results!

@rugabunda
Copy link
Author

rugabunda commented Apr 22, 2023

I haven't seemed to have had any sudden breaks in video plays in days now... not sure what caused it before. I'll post here again if I see anything.

@MysticFoxDE
Copy link
Owner

MysticFoxDE commented Apr 23, 2023

Hi @rugabunda,

I disable smartscreen system wide through group policy due to its privacy implications, and instead use anti-viruses with the highest ratted 'offline' detection rate, so that shouldn't be a problem...

caution, although SmartScreen and phishing protection can be configured in the same place, they both run independently of one another. In other words, if you deactivate SmartScreen, it does not automatically mean that the phishing protection is also deactivated.

Yeah most of the articles I found on that TCPIP parameter was ancient, but I did find one source citing its use in Windows 10, so I figured I'd give it a try. https://www.scene.co.za/windows/maximum-unique-tcp-connections-allowed-by-license-in-windows-10/

I already have a variety of items such as the following...
https://zditect.com/blog/413110.html
all of which prove that this limiter is still active. 🤢🤮🤮

In other words, thank you very much for the tip, I will probably implement this optimization in the script today. 😁

I haven't seemed to have had any sudden breaks in video plays in days now... not sure what caused it before. I'll post here again if I see anything.

Did you run the Script V2.01 before that?

Best Regards from Germany
Alex

Addendum:
V2.02 is ready. 😉

@MysticFoxDE
Copy link
Owner

Hi @rugabunda,

oh dear, I think you put me on the next big botch.

Today I tested again intensively regarding "EnableConnectionRateLimiting" and I don't think that this entry will do anything, at least not with Windows11 22H2. 😔

That is not to say that there is no problem here, on the contrary. As soon as I run iperf against the same target with more than 30 simultaneous connections, it crashes.
And if I think back now, then I have already seen the same behavior with ntttcp and also with the IOmeter.

Below is an example of the error from iperf (server side).
IPERF-ERROR

I have already tried various iperf versions and today I compiled a new version myself from the latest iperf3 repository at Github.
Nothing helped, all tested iperf versions run into the same problem, i.e. from ~30 simultaneous connections towards a crash.

Then I started the same test from a server 2019 against a server 2019 and got the same result, i.e. also seeing an iperf crash.

And at the latest after the server showed the same behavior, I got really curious.
Because some of our customers report various problems as soon as more than 20-25 users are logged on to a terminal server.
I think there is a connection between the behavior of iperf, ntttcp or IOmeter and the problem of the RDS server.

In order to be able to say more precisely, I have to do more research now.
But that can take a few days or weeks because I'm extremely busy at the moment. 😬

Best Regards from Germany
Alex

@MysticFoxDE
Copy link
Owner

MysticFoxDE commented Apr 24, 2023

Hi @rugabunda,

small update.

I did a new test this morning, in which I started iperf four times separately and ran it against a server 2019 with 16 parallel sessions each, i.e. with a total of 64 active connections.
In this constellation I could not see any problems.

IPERF3x4-P64

All 64 sessions could transmit data simultaneously without any problems and neither the client nor the server was tweaked in this area.

This means that a Windows 11 22H2 can easily establish and maintain 64 active TCP connections with an ongoing data transfer to one and the same destination. Incidentally, this is a heavy and not exactly everyday workload, which should only occur very rarely in the wild.

With another testing tool, I was even able to make ~16000 active connections to the same target. 🤪
In other words, the number of active connections doesn't seem to be the problem.

However, it was not possible to set up more than 30 active connections over which data could also be sent with just one iperf test running at the same time. 😔
From the ~30 simultaneously open TCP session with only one iperf3.exe, the following happens to me...

IPERF3-P40

Of course, this problem could be a bug in iperf.
On the other hand, I have seen a similar problem with various other test tools and applications.
So I'll definitely keep working on this topic. 😉

Best Regards from Germany
Alex

@rugabunda
Copy link
Author

rugabunda commented May 10, 2023

Hi @rugabunda,

Did you run the Script V2.01 before that?

Addendum: V2.02 is ready. 😉

No I was using Windows 11 22h2 anyway; and I see you have added EnableConnectionRateLimiting=0, thank you!.

16,000 connections, that is insane! Well. I don't know what is going on. But the video's feeds are breaking again. Maybe its happening from a middle box or some other reason. Actually... I was experiencing intermittent internet connection loss at the ISP level a few weeks back; had the isp come to investigate. Perhaps it is occurring again, albeit momentarily. I will have to run Pingplotter again to create a map of disruptions to ensure this is the case, which I believe is likely.

Thanks for your time! Your efforts are much appreciated!

@rugabunda
Copy link
Author

rugabunda commented May 10, 2023

Confirmed, it is an issue between the router and the ISP; Packet loss

image

@MysticFoxDE
Copy link
Owner

Hi @rugabunda,

thanks for the feedback, then the problem doesn't really have anything to do with my script, so I would close the case.

Best Regards from Germany
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants