J
J
jonxxx2013-12-22 18:35:06
Google Chrome
jonxxx, 2013-12-22 18:35:06

Why is Firefox loading slowly through socks proxy?

I recently ran into a problem and would like to ask the community for help.

Background: in connection with the latest laws (site blocking) I decided to set myself up for trouble-free surfing. VPN is not very suitable for me, so I chose the tunnel through SSH. But almost immediately I ran into a problem when working in firefox: slow page loading. It is clear that downloading through a proxy will be slower, but in this case it was abnormally slow. Moreover, the problem is with ff, for chrome and ie everything is fine with this. Googled, increased connection limits in about:config, but all in vain.

A few days ago I decided to figure out why ff has a problem with socks proxy. For experiments, I wrote socks proxy server v5. The server runs on the same machine, which means that the delays between the proxy and the browser are minimal. The results are something like this: chrome loads the page directly or through a proxy for about the same time. And with ff, the problem was confirmed, the download speed through a proxy decreases by an average of 30-50% and falls if several tabs are loaded at the same time.

The main difference between ff and chrome is the number of connections. For example, we take a heavy page with graphics, the total weight of resources is 25mb (all values ​​are approximate), about 300 http requests are needed to fully load. Chrome needs 90 tcp connections to download, and ff 320. The number of connections in ff can be reduced to about 250 if you disable dns lookup through a proxy, but this will not give speed. It turns out that chrome loads much more data through one connection.

From here there are two questions:
Why firefox through socks proxy is slower than chrome?
Why do these browsers have such a difference in the number of connections?
Thank you in advance.

Some technical data:
OS Windows 8.1.
Firefox & Chrome latest version.
Socks proxy server is written in C#, System.Net.Sockets.Socket class is used.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mayorovp, 2013-12-24
@mayorovp

"The class System.Net.Sockets.Socket is used" - the concept is highly extensible. For a select-based server, either 90 or 320 tcp connections is nonsense, but for a "normal" multi-threaded server, the very creation of 320 threads can cause slowdowns. And if you take threads from the pool at the same time, then the standard pool for 20 threads will not be enough for anyone.
So there are two main questions here - what technology did you use to create the server, and what technology did the author of the ssh tunnel use?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question