![]() |
Performance Tuning: Optimizing the Swap File |
On Windows 3.x, users could enhance performance by changing virtual memory settings. The Windows 95/98 swap file is dynamic, so it can shrink or grow based on the operations performed on the system and based on available disk space. A dynamic swap file is usually the most efficient use of resources. The swap file can also occupy a fragmented region of the hard disk with no substantial performance penalty.
Tip for Swap File Performance
The single best way you can ensure high swap file performance is to
make sure that the disk containing the swap file has ample free space so
that the swap file size can shrink and grow as needed.
The Windows 95/98 swap file (WIN386.SWP) is not a permanent file. However, Windows 95/98 can also use a permanent Windows 3.1 swap file. In this case, the file cannot shrink below the permanent size set for it in Windows 3.1, although the file can grow bigger if required.
Under Windows 95/98, the swap file can reside on a compressed drive if a protected-mode driver (that is, DRVSPACE.VXD) controls the compressed drive. DriveSpace marks the swap file as uncompressible and, to reduce the risk of fragmentation, places the swap file as the last file in the sector heap, which allows room for the swap file to grow.
For a computer that runs a shared version of Windows 95/98 from a server, the swap file is placed in the computer’s machine directory. If the computer is started from a floppy disk or uses remote booting, the swap file is in the machine directory on the network. If the computer is started from the local hard disk, the swap file can be stored in the machine directory on the local computer. Although the system defaults usually provide the best performance, you can adjust the parameters used to define the swap file. For example, to optimize swap file performance on a computer with multiple hard disk drives, you might want to override the default location of the Windows 95/98 swap file. The swap file should be placed on the drive with the fastest performance (unless that disk is overused). If a user usually loads all software from the same drive in a computer that has multiple drives, performance might be boosted by placing the swap file on one of the drives that is not as busy.
Caution: Completely disabling virtual memory might cause the computer to stop operating properly. You might not be able to restart the computer, or system performance might be degraded. Do not disable virtual memory unless instructed to do so by a technical support representative.
To adjust the virtual memory swap file
1. In the System option in Control Panel, click the Performance tab.
2. Click the Virtual Memory button.
3. To specify a different hard disk, click the option named Let Me Specify My Own Virtual Memory Settings. Then specify the new disk in the Hard Disk box. Or, type values (in kilobytes) in the Minimum or Maximum boxes. Then click OK.
If you set the maximum swap file size in the Virtual Memory dialog box to the amount of free space currently on a drive, Windows 95/98 assumes that it can increase the swap file beyond that size if more free disk space becomes available. If you want to impose a fixed limit on the swap file size, make sure that the limit you choose is less than the current maximum.
START> SETTINGS> CONTROL PANEL> SYSTEM> PERFORMANCE> VIRTUAL MEMORY
or
RIGHT CLICK MY COMPUTER> PERFORMANCE> VIRTUAL MEMORY
Name of the file
1. The file is called: WIN386.SWP
2. In Windows NT the swapfile can span multiple drives and is named
PAGEFILE.SYS
3. In Windows 3.x the swapfile was named SPARTPAR.386
Viewing the swapfile
Q: What are two ways to view the size of the swap file?
A: Properties sheet WIN386.SWP
A: (best practice) use system monitor to examine the "Swapfile Size
metric";
Note: "... virtual address space allows the VMM to map those addresses to a page table. A page table is like an index card. It keeps track of which programs are using which chunks of memory. The page table is mapped to either physical RAM or to your swapfile."
Note: a PAGE is the basic unit of measurement by the VMM (4K each page)
Swapfile - The virtual memory file on a hard disk containing the memory pages that have been out to disk to increase available RAM.
Programs make calls for memory at an address (example h100) which has been mapped to a location on the page table. That location on the page table then maps to either physical RAM or to a swapfile. Memory in Windows 95 programs are broken down into 4kb blocks called pages. These data pages are what is being mapped between the virtual addresses (location of data) and your virtual memory (a kernel service that stores memory pages not currently in use on a mass-storage device to free up the memory occupied for other uses). When a program makes a call for a data page that is not in physical memory (RAM), a page fault occurs. The page fault tells the VMM to load that page from the swapfile into memory. When a system has a page fault, it reading information from the hard disk rather than memory.
Excessive page faulting (excessive paging) results in poor performance.
To fix this:
a. reduce the number of concurrently running applications
b. add more RAM
The term thrashing means you are experiencing excessive page faults. Excessive paging signs include high CPU utilization and large amounts of hard disk activity.
Demand paging
When physical RAM becomes full, it will swap some of its data pages
out to the swapfile. This process is called demand paging or just paging.
The swapfile on the hard disk will grow or shrink as much as the current
conditions require. Windows 95 handles this but you can adjust it yourself.
Clean Up After Setup
Buying a new PC with Windows 98 preloaded is convenient, but it's also guaranteed to leave two irritating configuration mistakes on your system. Preloaded typically means preregistered, usually with a generic name like Authorized OEM Customer that ends up in registration dialog boxes when you install new software. And whenever you try to add or update a Windows feature, your preloaded copy defaults to a location like C:Windows OptionsCabs--even if you'd prefer to use the Windows 98 CD instead. Fortunately, both settings are easy to change.
To enter your name and the name of your organization, use the Registry Editor to change the RegisteredOwner and RegisteredOrganization values in HKEY_LOCAL_MACHINE SOFTWAREMicrosoftWindowsCurrentVersion
To modify the Setup source path, look for the following registry key:
HKEY_LOCAL_MACHINESoftwareMicrosoftWindows CurrentVersionSetupSourcePath.
============================
Get Help Faster; Never Forget F1
Microsoft's KnowledgeBase is a wonderful thing--when it's working. Fortunately, there's an easy way to get articles quickly from the KnowledgeBase: Just send an e-mail to mshelp@microsoft.com.
The KnowledgeBase-by-email robot uses the contents of the Subject line, ignoring the body of the message.
If you include an article number, MSHelp sends back that article. Use Q187602 as your subject, for example, to receive "Top Articles for Windows 98," a list of more than 60 useful articles.
Use Index as your subject, and MSHelp sends back a lengthy list of useful
articles, including packages of technical information available only via
e-mail. After reading the Index message, send back one of the six-digit
ID numbers to receive packaged content. Using 999970 as the subject, for
example, returns a list of all articles related to setting up Windows NT.
============================
Hide Annoying ScreenTips
Windows 98 displays annoying ScreenTips (like the one shown below) when you point at desktop icons or at the Close, Minimize, and Restore icons in any window. A simple checkbox gets rid of the desktop ScreenTips, but you have to hack the Registry to hide the others.
Step 1: Open Explorer and choose View, Folder Options. Click the View tab and uncheck the box labeled Show Pop-up Description for Folder and Desktop Items.
Step 2: Open Registry Editor, find the key HKEY_CURRENT_USERControl Paneldesktop, and locate UserPreferencemask. This value consists of four groups of two characters. You'll need to change the first character in the first value; if the value is AE 00 00 00, for example, the character you'll change is A.
Step 3: Double-click the UserPreferencemask value and replace the first
two-character value. Use the following list to replace the first character:
A=2, B=3, C=4, E=6, 8=0. Do not change the second character. For example,
AE becomes 2E.
============================
File Managing
Locate exactly what you're looking for--whether it's on the desktop or on a network.
The only people I haven't heard complain about "Windows Explorer File Manager" are new PC buyers who don't know any better.
Explorer pops up in places where you might not expect it. All common
dialog boxes--the ones that appear when you choose File, Open, or Save
As--use the Explorer code as well. With the right tweaks, however, Explorer
is a versatile file manager. Our tips to customize the My Documents and
Network Neighborhood folders are especially useful in these mini Explorer
windows.
============================
My Documents
In theory, the My Documents folder is a wonderful idea: a central location for all your personal data files. Increasingly, applications like Office are taking advantage of it too. But what if you work on 27 projects at a time, with each project getting a different folder? And what if your coworkers store shared project files in a variety of network locations?
Use the My Documents folder as the hub for all your filing chores. Don't
store documents there--instead, fill it with shortcuts to the folders in
which you actually store files. To open or save files in any of your far-flung
data folders, use the drop-down list at the top of every common Windows
dialog box (or in Office 2000's Places bar) to return to the My Documents
folder. Then double-click a shortcut to open the folder you really want
to use. Creating a hub-and-spoke filing system means your favorite locations
are never more than two clicks away.
============================
Find Files Faster
When you save working documents in a variety of folders, finding the
right one can be frustrating, especially when multiple servers are involved--unless,
of course, you create a shortcut that automatically looks in all your most
commonly used folders. Begin by clicking the Start button and choosing
Find, Files or Folders. In the box labeled Look In, enter the full path
for each folder you want to search, separating each entry with a semicolon,
then choose File, Save Search. Windows creates a shortcut on the desktop,
saving your list of locations. Rename the shortcut Search for Data Files
and drag it to the Start menu. When you open this saved search, enter your
search criteria and click Find Now to troll all the specified folders at
once.
============================
A Custom Network Neighborhood
On large corporate networks, Network Neighborhood can be a vast and confusing place. When you double-click on the Entire Network icon, you see dozens or even hundreds of servers. You can't drag your own shortcuts into Network Neighborhood, but there is a secret, undocumented way to add useful shortcuts to network resources you use frequently, including mapped drives, servers, folders, printers, and even files.
Open the NetHood folder. On a default Windows 98 installation without
user profiles, you'll find this folder at C:WindowsNetHood; if you've set
up user profiles, look for your personal NetHood folder at C:WindowsProfiles<<I>username</I>>
(substituting your username, of course). Now browse through Network Neighborhood,
find the resources you use most often, and drag them to your NetHood folder.
The next time you open Network Neighborhood--from the desktop or from a
common dialog box--all your resources will be available.
============================
Manage Removable Disks
Do you use floppy disks or a Zip drive to store backup copies of important
files? Then you need Partridge Software CopyEx, a $10 shareware program
that hooks into your SendTo folder and intercepts your request any time
you use the right-click Send To menu with a removable disk, such as a floppy
or a Zip disk. If the target disk is low on space, you can delete one or
more files or compress the file you're copying, all in a single step. Download
CopyEx from ZDNet's Software Library at
http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=000VAC&b=help
============================
Take Control of Explorer
Make Explorer's Details view far more useful with two simple changes. First, edit the description of file types you use regularly--especially those that begin with Microsoft--so you can easily distinguish different types. Next, specify those file types whose extensions should always be visible. This option lets you quickly change a DOC file to a BAK file, for example.
Step 1: Open the Explorer window. Choose View, Folder Options, and click the File Types tab. Pick a file type you use frequently and click the Edit button.
Step 2: Change the text in the Description of Type box. By starting the new description with the extension, you ensure that sorting by type also sorts by extension.
Step 3: At the bottom of the Edit File Type dialog box, check the Always Show Extension box to ensure that extensions are always visible.
Step 4: Repeat the previous steps for other file types. When you finish,
Details view will let you edit extensions.
============================
IE5 Tricks Make Internet Explorer do your work easier with these
tips.
Upgrading Windows 98 with Internet Explorer 5.0 makes Web browsing faster, neater, and less complex. But IE5's default settings require a bit of tweaking, and some of its best features are buried.
If you're a Netscape Navigator user, don't skip over this section--you'll
find that IE5 coexists extremely well with its archrival, and for some
tasks (such as saving complete Web pages), IE is a better solution. If
you use Quicken or other programs that hook into Explorer, you won't have
a choice--IE is the browser that pops up automatically.
============================
Password Protection
IE5 adds a potentially dangerous new capability to Internet Explorer's AutoComplete feature. Instead of simply suggesting the rest of a URL in the Address box, this option offers to save usernames and passwords so you can log in to password-protected sites automatically. The security implications are ominous: If you save the username and password for your bank or brokerage account, anyone who sits down at your PC can log on and access that information.
On a Windows NT workstation, this option is reasonably safe because you can prevent unauthorized users from logging on to your PC. But Windows 98 users should disable this dangerous option.
From any IE5 window, choose Tools, Internet Options, click the Content
tab, and click the AutoComplete button. In the area labeled Use AutoComplete
For, deselect the checkmark next to User Names and Passwords on Forms.
If you've inadvertently saved some sensitive information already, click
the Clear Passwords button, too. Restart your system to ensure that the
changes take effect.
============================
Steal Full Web Pages (Except Mine of course)
You've found a Web page you want to save for offline viewing. With most browsers, including IE4, choosing File, Save captures only the HTML text--leaving behind the graphics and key details for any additional frames. If you want to save those extra pieces, you have to right-click each element, save it, and then edit the source. Ugh.
IE5, however, gives you an easier option. Choose File, Save As, Complete Web Page to save the current page as an HTML document, including all graphics and source code for other frames. Supporting files go in a folder that has the same name as the saved HTML page. You can move the resulting Web page freely as long as you move the supporting folder with it. You can also rename the page--just keep the name of the HTML document and its supporting folder in sync.
Web Pages Anytime Were you confused by IE4's inscrutable subscription
options? Join the club. IE5 fixes this usability nightmare with a one-click
option. In fact, it takes so little effort you might miss it. When you
find a Web page you want to have available at all times, even when you're
not connected to the Net, add it to your Favorites list and check the box
labeled Make Available Offline. To update all your favorites at one time,
choose Tools, Synchronize.
============================
Fast Log-ins to FTP Sites
If you routinely download files from FTP sites, you'll appreciate IE5's dramatically improved FTP options. After entering a URL that begins with ftp://, you'll see a log-in dialog box like the one shown here, which lets you specify a username and password. For one-click access to password-protected FTP sites, use this undocumented trick to store your log-in details as part of a shortcut. Right-click the desktop or any folder; choose New, Shortcut; and enter this text as the command line (substituting your details for the italicized placeholders): ftp://username:password@ ftp.example.com/<<I>path</I>>
After creating the shortcut, you can send it to another user via e-mail,
or make it available on a shared folder. Of course, any shortcut you create
using this technique is inherently insecure--anyone who can inspect its
properties can see the password--so don't use it to access FTP sites that
hold confidential information.
============================
Keep Win98 Up to Date
Install the Critical Update Notification component, which scans the Web in the background without any effort from you. Pop-up messages alert you whenever Microsoft releases fixes for bugs that can destroy data or compromise security. Don't worry--nothing gets installed until you give your approval.
Step 1: Choose Tools, Windows Update from any browser window. After connecting with the Windows Update site, click the Product Updates link, and click Yes when asked if it's OK to scan for installed upgrades.
Step 2: Select from the list of available updates, then click the Download button. Include the Critical Update Notification component.
Step 3: After installing this component, you'll see a dialog box whenever Microsoft releases a critical update. Follow the instructions to view and install the fix.
Step 4: In theory, the Device Drivers link on the Windows Update page
searches for updated hardware drivers, but you're unlikely to find anything
useful here.