The Expert's Guide to Windows 98 WinAlign

WinAlign is an advanced technique for optimizing Windows 98. It is not necessary to use WinAlign to align programs with Windows 98, but it may help you get the maximum performance from your system.

InformationWeek Staff, Contributor

November 20, 2003

4 Min Read
InformationWeek logo in a gray background | InformationWeek

Program alignment (the WinAlign or Walign utilities) modifies the internal contents of a program file (.EXE or .DLL) so that each code or data section starts on a multiple of 4096 bytes (4KB) from the start of the file. This improves performance because it lets Windows 98 run the program without copying the code to another block of memory.

Disk optimization (the Disk Defragmenter utility) modifies the layout of files on the disk to reduce the amount of disk head motion required to load files. This improves performance because disk latency is the largest contributor to program load times.

After you have run WinAlign on some program files, you will subsequently want to run the Windows 98 Disk Defragmenter utility at some point. This is because WinAlign will likely have moved the program files to another location on the disk that is no longer optimal. If you have run Maintenance Wizard, Disk Defragmenter will be run for you automatically as part of your Scheduled Tasks.

Alignment utilities
There are two utilities that Microsoft offers to align programs. The first, Walign, is part of the standard Windows 98 distribution and resides in the Windows System directory. This is a special-purpose tool. It only aligns a small number of files and only works if Microsoft Office is present on your system. The Windows 98 Resource Kit has a utility called WinAlign, but you must purchase the Resource Kit to obtain this utility. The WinAlign How-To provides another way to align files using a batch file that we have written.

What Windows 98 aligns
Most of the applets and utilities that ship with Windows 98 have already been aligned, so you don't need to align those files. Most of your existing applications will be unaligned, since they shipped before Windows 98. The Walign.exe program that comes with Windows 98 aligns a few files that it finds on your hard disk, but only if it finds a copy of Microsoft Office (95 or 97) installed. If Office is not present on your disk when Windows 98 is installed, the setup program creates a scheduled task that runs occasionally. (See the Task Scheduler icon on the system tray.) If you install Office, the scheduled task will detect this and run Walign, then remove itself from the scheduled tasks list. (See the FAQ for details on the list of files.)

Align your own
Since Microsoft only took care of its own programs with WAlign, some of your most commonly used applications probably aren't getting the benefit of the Windows 98 aligned code optimizations. However, you can align the applications yourself if you have a bit of skill.

What should you align? The best candidates are your most frequently executed programs, especially those that you start and exit many times a day. Program loading is the situation where WinAlign really helps. One good example, and the one used in our own performance tests, is Netscape Navigator. Complete instructions for aligning your own programs can be found in ourWinAlign How-To.

Performance Gains
Our performance tests have shown that aligning a large application (in our case, Netscape Navigator 4.05) can reduce program launch times by about 20 percent. Since aligning applications reduces the amount of memory thrashing, it should also be beneficial for power users who start and run many applications at once.

Pros and Cons of WinAlign

PRO

• Reduces program load times• Increases disk cache efficiency• Improves overall RAM usage

CON

• Increases program file size• Some programs can't be aligned• Aligned files can't be patched

The main reason to bother with align programs is that it can improve performance, particularly when you are launching a program. Windows 98 can make better use of memory, which means there's less disk activity and higher performance. On the downside, aligning a file will increase its size slightly. There are also some programs that won't work correctly when they are aligned; see the WinAlign FAQ for more information.

Continue to: WinAlign FAQ

Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like


More Insights