Topic "Faster uploading tweak"

Author Message
navilor
[View user's profile]

Joined: 2009-11-01
Posts: 10
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: http://www.overclock.net/t/1334719/high-precision-event-timer 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 http://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/show_bug.cgi?id=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>
Advertisements
navilor
[View user's profile]

Joined: 2009-11-01
Posts: 10
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:
http://www.overclock.net/t/1334719/high-precision-event-timer

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:
[url]<invalid hyperlink removed by admin>[/url]
[url]<invalid hyperlink removed by admin>[/url]

http://www.blackviper.com/service-configurations/black-vipers-windows-7-service-pack-1-service-configurations/

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

Network tweaking
========================================


TCP Optimizer:
http://www.speedguide.net/tcpoptimizer.php

http://www.speedguide.net/analyzer.php

netsh interface tcp set global autotuning=disabled

https://social.technet.microsoft.com/Forums/windows/en-US/f79b0ff2-9f1b-464c-9664-5595fc3556d2/slow-file-transfer-on-lan-machines-os-win-7-ultimate-32-bit-avg-internet-security

netsh interface tcp set global rss=disabled

netsh int ip set global taskoffload=disabled

https://social.technet.microsoft.com/Forums/windowsserver/en-US/a543c608-91b0-4a27-95a2-f5e24e36b5cc/windows-7-network-connection-to-server2003-slow-browser-and-slow-sql-query

netsh int tcp set heuristics disabled

[url]<invalid hyperlink removed by admin>[/url]

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:

https://blogs.technet.microsoft.com/askds/2009/06/26/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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Thanks for all these hints.
I suppose that HPET cannot be enabled on per-application basis, right?
_________________
Martin Prikryl
navilor
[View user's profile]

Joined: 2009-11-01
Posts: 10
prikryl wrote:
Thanks for all these hints.
I suppose that HPET cannot be enabled on per-application basis, right?


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:
[url]<invalid hyperlink removed by admin>[/url]

Were you able to reproduce this? If so what were your results?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Thanks for your response.
I haven't tested this yet. Will do.
_________________
Martin Prikryl
ThüringerMatMoschtert

Guest


On large enough files, it would still be faster, even counting the install time of Linux... Smile
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License