Menu

#1391 Low performance while streaming

3.0.x
closed
other (323)
5
2011-01-19
2010-12-11
OpusOne
No

Hi,

Been using Privoxy for a while and love it.

Only one problem I've had, though, and this is that any kind of stream - any embedded video, for example - loads very slowly with Privoxy. I've been running some speed tests, and if I bypass Privoxy, I generally get 10+ Mbps and quite often more like 15. If I route traffic through Privoxy - whether it is enabled or not - I see around 5Mbps max.

The machine I'm running Privoxy on is a Core Duo 1.66GHz with 2GB RAM; it ought not be the limiting factor. I haven't messed much with the Privoxy settings yet; it's using the default buffer-size and is not set to run only in a single thread. I've verified this with Privoxy 3.0.16 and 3.0.17 on Windows, 3.0.16 on Ubuntu Server 10.10.

Any idea if this is something that could be resolved with configuration, or is this a limitation of Privoxy itself? I don't think I can live without Privoxy any more, but it is a pain to have to change proxy settings to be able to stream something of 720p quality or higher.

Tech details: 1.66GHz Core Duo; 2GB RAM; WinXP Home; Ubuntu Server 10.10 (virtualized); using a software firewall; have used Polipo chained to Privoxy but that doesn't affect the issue; tested with Firefox 3.6.12, Chrome 9.x and 10.x, Internet Explorer 8.

Thanks!

Discussion

  • Fabian Keil

    Fabian Keil - 2010-12-12

    Thanks for the report.

    Please reproduce the problem with the debug settings described at:
    http://www.privoxy.org/user-manual/contact.html#CONTACT-BUGS
    attach the logfile, and describe how you are measuring the bandwidth.

    This isn't a known Privoxy limitation, please have a look at
    http://sourceforge.net/mailarchive/message.php?msg_id=23602205
    for measurements done on a slightly more powerful CPU and some
    TCP parameters you could mess with.

     
  • Fabian Keil

    Fabian Keil - 2010-12-12
    • assigned_to: nobody --> fabiankeil
    • status: open --> pending
     
  • OpusOne

    OpusOne - 2010-12-12

    I took a look through the config and made sure everything looked as close to default as reasonable. I upped the buffer-size per the thread you linked, though am unsure if it is the same buffer as mentioned.

    I've been measuring transfer speeds by using standard (flash-based) tests, in particular, speakeasy.net/speedtest. I use the nearest server. Not the most scientific, to be sure, but gives consistent results, and mimics my real-world issues with streaming through flash.

    The two logs that are attached are two such runs, one with Privoxy enabled, the other disabled, with the debug settings given in the other link you provided. Traffic is being routed through a software firewall, but I've tried with and without it - no difference. It was enabled during these tests.

    In each case, download was around 5Mbps and up just shy of 1Mbps.

    I haven't gone poking though TCP settings yet, though I may try later. Just wonder what a chore that will end up being, as I'm connecting out through a friend's Apple wireless router which I don't have control of.

     
  • OpusOne

    OpusOne - 2010-12-12

    Speakeasy speedtest

     
  • OpusOne

    OpusOne - 2010-12-12

    Speakeasy speedtest, no filtering

     
  • OpusOne

    OpusOne - 2010-12-20

    Just an update, with some more scientific results than "it seems noticeably faster/slower."

    All I did was grab some screen captures of the network activity while doing a Speakeasy speed-test with a nearby server. Three images: Privoxy enabled, Privoxy disabled, and not routing traffic through Privoxy.

    This was done in Chrome 10.0.614.0, using Privoxy 3.0.17 for Windows on WinXP. Comodo Firewall is in there as well. I did test without the firewall running with traffic routed through Privoxy, and found no difference.

    I'll try it on some streaming video or something later, perhaps, but this should explain what I'm seeing pretty clearly.

    Thanks again!

     
  • OpusOne

    OpusOne - 2010-12-20

    Speakeasy speedtest, privoxy on and enabled

     
  • OpusOne

    OpusOne - 2010-12-20

    Speakeasy speedtest, privoxy on but filtering disabled

     
  • OpusOne

    OpusOne - 2010-12-20

    Speakeasy speedtest, traffic not routed through Privoxy

     
  • Fabian Keil

    Fabian Keil - 2010-12-20

    Thanks for the additional information.

    Looking at the log it seems to me that you are measuring the upload performance, not the download performance. Is your use case really streaming from the client to the server, not the other way around?

    Anyway, I still think the limit you are hitting is more likely in your TCP settings than in Privoxy itself. Given that you already have Polipo installed anyway, can you repeat the tests with Polipo instead of Privoxy?

     
  • OpusOne

    OpusOne - 2010-12-20

    I'm measuring the download performance. Upload is constant at about 1Mbps, Privoxy or no. But with Privoxy, downstream performance - test site to my computer - is more than halved.

    In those graphs - the green is the downstream network activity.

    I can try through Polipo, though I don't understand the effect this will have. If it is something with my (Windows-default) TCP settings, should those same settings not affect performance when no using a proxy?

     
  • Fabian Keil

    Fabian Keil - 2010-12-25

    You're right, I missed the requests at the beginning as they take less space in the log than the uploads.

    Using a proxy or not makes a differences because by adding the proxy you add an additional sender and receiver to the connection and the connection between the proxy and your client is entirely controlled by your own TCP settings, while the connection to the website is also influenced by the TCP settings on the server side.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     
  • Fabian Keil

    Fabian Keil - 2010-12-26
    • status: closed --> pending
     
  • Fabian Keil

    Fabian Keil - 2011-01-02

    You may be interested in the thread:
    http://sourceforge.net/mailarchive/message.php?msg_id=26830967

    Is there a chance that you could repeat your test with Privoxy rebuilt from CVS?

     
  • Lee

    Lee - 2011-01-02

    Another interesting thread:
    http://code.google.com/p/chromium/issues/detail?id=6356
    If chrome sets the tcp window size to 32K and XP defaults to 16K that might be enough to explain the differences you're seeing with chrome + privoxy vs. chrome all by itself..

    I'd be interested in seeing what you get in the "share your results" section from http://www.speedguide.net/analyzer.php
    & as long as I'm going fishing, the output from "The following options were given in the config file:" section of http://config.privoxy.org/show-status would be nice also.

    Lee

     
  • OpusOne

    OpusOne - 2011-01-02

    Sorry for the delay, everyone, didn't have a chance to do much on this with holidays and travel and everything.

    I did play with TCP settings a little bit by manually changing the registry, but didn't see any difference, and didn't have a way to verify my changes were being picked up at all.

    that speedguide.net analyzer gave me that much: I can see the TCP window size. I also notice that when switching Windows proxy settings on and off, and takes a little bit for that analyzer to pick up the changes Chrome is making (and I was making sure to do a Ctrl+F5 so I wasn't loading from cache). This may have made my changes seem insignificant.

    That same website has an optimization tool, so I decided to go that route. After some changes and a reboot (I just let it optimize its way after inputting the nominal connection speed), the TcpWindowSize is now at 513920 - versus ~17000 by WinXP defaults or 65536 by Chrome. It made some other changes, too.

    The result: I'm now pulling ~16Mbps down, through Privoxy, on a nominal 15Mbps line (though they may play games with a speed bump for the first few MB, not sure). Everything seems to be solved. This is now faster than Chrome's default, which currently (I'm guessing due to ISP load) is pulling about 12Mbps.

    Thanks for all the help! I didn't realize WinXP's default config was so bad - it seems to be optimized for very low-latency links. I wonder if Firefox and IE also change the TCP window size, because if they were using the defaults that apparently Privoxy was using, I'd've expected the same problem.

    It's terrible form on Microsoft's part that third-party software would have to make these changes. but maybe it's what I get for using a nearly 10 year old operating system...

    Next project: chaining Privoxy to Ziproxy for 3G access.

     
  • OpusOne

    OpusOne - 2011-01-02
    • status: pending --> closed
     
  • OpusOne

    OpusOne - 2011-01-02

    I think this is a manifestation of the "100% CPU" problem. What
    happens is some site has massive amounts of whitespace in their
    HTML that you don't ultimately see, but Privoxy spends a lot of
    time trying to filter it all. The interim solution is to keep
    Privoxy from filtering that particular site in the user.action
    file. Of course, once Privoxy starts spinning, it'll need to be
    killed and restarted.

    The problem is in the js-annoyances and the unsolicited-popups
    filters. If you turn those off in general (or for your problem
    site(s) in particular) I think you'll have better luck. Can you
    please give that a try?

     
  • Fabian Keil

    Fabian Keil - 2011-01-05

    Was the last comment really meant for this support request? I fail to see the connection.

     
  • Fabian Keil

    Fabian Keil - 2011-01-05
    • status: closed --> pending
     
  • OpusOne

    OpusOne - 2011-01-05

    I don't see the connection either, and I don't know why it appears to have been posted under my account.

    Time to change out passwords and notify Sourceforge admins that something is odd...

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.