JSI Tip 7268. TuneSVR.bat tunes the Server service in batch.


If you have ever run NET CONFIG SERVER in conjunction with the /AUTODISCONNECT, /SERVCOMMENT, OR /HIDDEN switches, you have accidentally turned off auto-tuning of the SERVER service. If you run NET CONFIG SERVER without any switches, you get useful information about your server or workstation:

Server Name                           \\JSI001
Server Comment

Software version                      Microsoft Windows Server 2003
Server is active on
        NetbiosSmb (000000000000)
        NetBT_Tcpip_\{CFA4B0D2-15D3-423F-9C67-27708110A398\} (0050da173d80)
        NetBT_Tcpip_\{D436F471-1F4F-4B10-A4E6-47B81181A25D\} (0050da662b16)


Server hidden                         No
Maximum Logged On Users               Unlimited
Maximum open files per session        16384

Idle session time (min)               15
The command completed successfully.



Server Name                           \\JSI009
Server Comment                        Dell Precision Workstation 650

Software version                      Windows 2002
Server is active on
        NetbiosSmb (000000000000)
        NetBT_Tcpip_\{D0543B7A-9408-44D7-AE00-01200D50952C\} (0008744fe7e3)


Server hidden                         No
Maximum Logged On Users               10
Maximum open files per session        16384

Idle session time (min)               15
The command completed successfully.
To tune the Server service, I have scripted TuneSVR.bat.

The syntax for using TuneSVR.bat is:

TuneSVR size LargeSystemCache

where

size can be             1 = Minimize Memory Used.
                        2 = Balance.
                        3 = Maximize Throughput for File Sharing and Maximize Throughput for Network Applications.
and

LargeSystemCache can be 1 = Maximize Throughput for File Sharing, which uses program memory for I/O functions when the cache is full.
                        0 = Maximize Throughput for Network Applications, which uses cache memory only for I/O functions.
TuneSVR.bat contains:
@echo off
If \{%1\}

\{\} @echo Syntax: TuneSVR 1/2/3 0/1&goto :EOF if \{%1\} LSS \{1\} @echo Syntax: TuneSVR 1/2/3 0/1&goto :EOF if \{%1\} GTR \{3\} @echo Syntax: TuneSVR 1/2/3 0/1&goto :EOF If \{%2\}

\{\} @echo Syntax: TuneSVR 1/2/3 0/1&goto :EOF If /i \{%2\}

\{0\} goto OK If /i \{%2\}

\{1\} goto OK @echo Syntax: TuneSVR 1/2/3 0/1&goto :EOF :OK @echo REGEDIT4>%TEMP%\TuneSVR.reg @echo.>>%TEMP%\TuneSVR.reg @echo \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\]>>%TEMP%\TuneSVR.reg @echo "size"=dword:0000000%1>>%TEMP%\TuneSVR.reg @echo.>>%TEMP%\TuneSVR.reg @echo \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\]>>%TEMP%\TuneSVR.reg @echo "LargeSystemCache"=dword:0000000%2>>%TEMP%\TuneSVR.reg @echo.>>%TEMP%\TuneSVR.reg regedit /s %TEMP%\TuneSVR.reg del /q %TEMP%\TuneSVR.reg
NOTE: You must restart the computer for these settings to take effect.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish