Faster uploading tweak

Advertisement

navilor
Joined:
Posts:
10

Faster uploading tweak

I did not find an alternative place to post this as this is not a bug with WinSCP but is instead a problem with the default configuration in Windows 7. Even after reading your FAQ (https://winscp.net/eng/docs/faq) and another article (https://winscp.net/eng/docs/faq_slow) my upload speed on Windows 7 was abysmally slow. As I was benchmarking my new video card one of the applications had a problem and did not finish it's run. Looking online I found that I needed to implement HPET (High Precision Event Timer) in my BIOS. I looked in there however it was already enabled. I did some research which indicates that Windows has it's own different methods and uses those by default even when HPET is enabled in the BIOS. The answer that fixed that issue is below: https://www.overclock.net/threads/high-precision-event-timer.1334719/ The key things to know are in the article however this cuts to the chase:
  1. Enable HPET in BIOS. If you have HPET option in BIOS then your hardware can support HPET.
  2. Enable HPET in Windows by giving this command in admin credential CMD:
    bcdedit /set useplatformclock true
  3. Reboot
I use the ssh blowfish cypher and after changing that one setting on the command line in Windows my upload speed became four times faster. Specifically it went from around 5,000 KiB to 21,000 KiB. Please note that my CPU is running at 4.2Ghz (Core i7 3770K) and that WinSCP maxed out one core after my tweak whereas before the CPU was essentially idling during upload. In addition I run TCP Optimizer https://www.speedguide.net/downloads.php when I first installed Windows about a year ago and it made no difference for my ssh upload speed at that time. As I stated above I do not believe that this is a bug https://winscp.net/tracker/164 in WinSCP but is instead an issue with Windows 7's default configuration. If you can validate this you may want to add this information to your FAQ. If you cannot reproduce what I have shown I can provide you some exceptionally detailed information regarding my system to see if that helps. Below are the settings that I used with TCP Optimizer . <invalid hyperlink removed by admin>

Reply with quote

Advertisement

navilor
Joined:
Posts:
10

More information on my system

When I install Windows these are all of the things that I do for optimizing performance. It is a "tweak guide" that I send out to the occasional person who requests it. You will note that I now include the HPET tweak.

I hope that this helps with reproducing my higher level of performance.

CPU tweaks:
Core Parking
http://forum.cakewalk.com/Windows-7-amp-Core-Parking-a-better-way-to-Turn-It-OFF-m1861804.aspx

HPET:
https://www.overclock.net/threads/high-precision-event-timer.1334719/

Key steps for HPET:
  1. Enable HPET in BIOS. If you have HPET option in BIOS then your hardware can support HPET.
  2. Enable HPET in Windows by giving this command in admin credential CMD:
    bcdedit /set useplatformclock true
  3. Reboot

Service tweaking:

ReadyBoost really does help if you do not have an SSD. Use a USB3 stick even if you only have USB2 connections:
<invalid hyperlink removed by admin>
<invalid hyperlink removed by admin>
<invalid hyperlink removed by admin>

I disable Distributed Client Tracking Service because it serves no valid purpose on my system,

Network tweaking
  1. Disable RDC
    Go to "Programs and features" > "Turn Windows features on or off" > Uncheck Remote Differential Compression. There is a great counterargument for leaving it enabled:
    Debunking the Vista Remote Differential Compression Myth

  2. DisableBandwidthThrottling
    Open regedit and find:
    HKLM\system\CurrentControlSet\Services\lanmanworkstation\parameters\
    Create a new DWORD named DisableBandwidthThrottling, change the Base radio button to Decimal then change the Value data entry to 1.
    The default is 0. This setting is available starting with Windows Server 2008 SP2.
    By default, the SMB redirector throttles throughput across high-latency network connections in some cases to avoid network-related timeouts.
    Setting this registry value to 1 disables this throttling, enabling higher file transfer throughput over high-latency network connections.
  3. Disable NetworkThrottlingIndex
    Open regedit and find:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile
    Locate the NetworkThrottlingIndex DWORD entry. Double-click it to open and change the Base to Decimal.
    The default value for this DWORD is 10, but the valid range for it is 1 to 70.
    You can try lower values than 10, but I want to start off with totally disabling by using a value of 1 in the Value data field.
  4. Tune advanced card proprieties in device manager
    disable power management in device manager for network card
    disable IPv6 and all advanced ipv6 features like:
    • TCP Check-sum Offload (IPv6)
    • UDP Check-sum Offload (IPv6)
    • Large Send Offload (LSO) v2 (IPv6)
    force network card speed to 1Gb full duplex (assuming your running gbic nics).
    "Jumbo Frame"(MTU), check if your nic/network supports "Jumbo Frame", mine is 9k. Go to device manager again and set it up. Don’t skip this one it will give a nice boost.
    Set receive/transmit buffers, change to 512/128, respectively, or whatever is the top value for your nic, mine was 512 for receive and 128 for transmit.
    If you don’t have many of these options just download the driver for your nic from the manufacture website, as many times installed drivers are Microsoft generic drivers, lacking many options.

  5. Disable task offload from CLI
    (you probably have this option in device manager, but this way it will be disabled even if your nic driver doesn’t support/use it)
    Run a command shell as admin and paste:
    netsh int ip set global taskoffload=disabled
And to finish, reboot and test smb/cifs performance.

Logging:

I make sure to monitor my logs to see if there are any problems. The best way to clean them that I have found is this:

Run as Administrator on the command line.
for /f %x in ('wevtutil el') do wevtutil cl "%x"
Reboot the PC, look in Event Viewer and start playing whack a mole. I recommend having the following custom views with Critical, Error, and Warning:
  • Administrative Events
  • Application
  • Boot Time
  • Security
  • Setup
  • System
Make sure to have good backups of your settings and document everything so that you can revert if needed.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Faster uploading tweak

Thanks for all these hints.
I suppose that HPET cannot be enabled on per-application basis, right?

Reply with quote

navilor
Joined:
Posts:
10

Re: Faster uploading tweak

I am always happy to help.

To the best of my knowledge that is correct. It is an OS/BIOS level requirement.
  1. If HPET is enabled in the BIOS then the OS needs to be directed to listen to it via the tweak. It would become awkward were there more than one timer to reference.

  2. If HPET is not enabled or available in the BIOS then I have no idea what would happen if you performed the tweak in Windows.
Linux checks to see if HPET is enabled in the BIOS and if so enables it in the OS:
<invalid hyperlink removed by admin>

Were you able to reproduce this? If so what were your results?

Reply with quote

Advertisement

ThüringerMatMoschtert
Guest

Wouldn't it be even quicker to just install Linux?

On large enough files, it would still be faster, even counting the install time of Linux... :-)

Reply with quote

Advertisement

You can post new topics in this forum