VOICE Home Page: http://www.os2voice.org
[Newsletter Index]
[Previous Page] [Next Page]
[Features Index]

September 2000

How to Supercharge OS/2 Warp -
Part 4

By Christian Hennecke ©September 2000 

The OS/2 Files: http://www.os2world.com/os2files/

Files mentioned in this article:
Scitech Software's Display Doctor for OS/2: http://www.scitechsoft.com/sdd_os2.html
IBM Special Edition of the SDD/2: http://service.software.ibm.com/os2ddpak/html/displayc/index.htm
SETUP4K6: http://warp2001.com/os2/os2stuff.html
DIVETEST: ftp://ftp.netlabs.org/pub/odin/divetest.zip
OS/2 Time Slice Releaser: ftp://hobbes.nmsu.edu/pub/dos/ostsr12i.zip
F4_35_CA: ftp://hobbes.nmsu.edu/pub/dos/f4_35_ca.zip
TAME: ftp://hobbes.nmsu.edu/pub/dos/tame333.zip

It's supercharging time again. This month we will have a look at video performance and some GUI optimizations. And there is more! The last weeks saw several threads in the newsgroups about problems people had with high CPU loads running DOS and Win-OS/2 applications. The second part of this article therefore contains tips to solve or workaround the problem and other general DOS/Win-OS/2 information.

This is also a call for help. Next month's article is to deal with printing and networking. However, being a networking rookie, I don't know that much about optimizing this part of OS/2. So if you know how to speed it up or increase functionality (e.g. undocumented features) please contact me. I would also like to know something about network printers that seem to be tricky to configure. Thanks!

This article is part of a series on improving your OS/2 system that is published in the VOICE Newsletter. Last month's articles covered CD-ROM and harddrive performance, responsiveness and stability issues and memory consumption. All the tips can be viewed at my homepage at http://www.os2world.com/os2files/ by selecting the tuning link.

Again: These tips apply for the most part to all versions of Warp, unless otherwise noted. They also take into account that you might be running an old, slow machine. There may be errors or omissions that might lead to your machine blowing up. I strongly advise you to make a backup before fiddling around with your system's settings. You've been warned.

For credits please see "How to Supercharge OS/2 Warp - Part 1" in the June 2000 issue of the VOICE Newsletter.

5. Video and the GUI

5.1 Basics

The most important things about speeding up your existing video card are resolution, colour depth and a good display driver. Essentially, the higher the number of pixels the video card is asked to display, the more time and computer power will be required. Therefore, if you can live with 800 x 600 resolution, then that would be a better performance choice than opting for 1024 x 768, or higher. Also, the less colors in your display palette, the faster your video response time will be. If you don't need 16.7 million colors (24 or 32 bit colour depth), don't use them. 65335 colours or 16bit colour depth will be displayed faster and your eyes won't note the difference.
Note: Alas, there are very few companies left that make decent OS/2 drivers for their graphics cards. In fact Matrox is the only one since ELSA left the OS/2 market. Add to this that nowadays the driver has become the biggest issue as far as speed is concerned (my Matrox G400 is pretty much equally fast at 800x600 and 1600x1200 resolutions). BUT in 1999 Scitech Soft began porting their Display Doctor to OS/2! This software provides highly accelerated plug&play drivers for most graphics cards or chip sets on earth and also adds things like customizable screen modes or refreshrate change on the fly. According to Sysbench (a benchmarking suite for OS/2) my Matrox G400 achieves nearly double the performance as with the Matrox drivers. This driver is a commercial product that currently is still in beta stage. BTW, IBM licensed a "lite" version of this driver for all OS/2 users for free use. This version has limited available modes and refresh rates (max. 85Hz).

5.2 DIVE performance

If you have a motherboard with an Intel CPU and chipset you won't need to read this section any further since its BIOS will take care of activating all interesting features for you. However, if you have an AMD K6-2 or K6-III CPU with CXT core read on.

These processors offer features called write allocation and write combining. They can speed up data transfer to the video memory and general memory write operations consideringly, but they need to be turned on. Unfortunately, many BIOSes won't do that for you and it has be done by a driver instead. To my knowledge this feature is built into every Windows video driver, but for OS/2 Scitech Display Doctor is the only one that is capable of doing so.

But you are not completely out of luck if you don't have SDD installed. Several people have written small drivers to switch on the features. I recommened the free package setup4k6 by Cornel Huth that includes a nice tool that comes in very handy for calculating the parameters that have to be passed to the driver. The problem is that you have to specify the starting address of your video card's frame buffer. I was told that it's easy to find it for any Matrox card, since the Matrox driver's settings tool displays it as Board mapping on the Information tab. Wrong! Do not use that value.
Get the free tool DIVETEST instead. Start it, go to the DIVE tab and press Query Caps. Now you should be able to see the required address in the Starts at: field below the Get Framebuffer Information line. Use this address to calculate the required parameters. Doing so increased DIVE-marks for my G400 in Sysbench from 80.613 to 117.665 which is the same value that can be achieved with SDD. There is still one caveat: Do not activate EnDIVE, otherwise you will see a performance hit. But since EnDIVE implementations don't work correctly for most video cards anyway, you probably won't loose any features.

5.3 Bitmaps and pointers

Also related to video in OS/2 are bitmapped backgrounds. They may look very pretty on your Desktop, but they are stealing processing power and RAM from your computer. Save the nice bitmaps for use as a lock-up screen. Using color schemes that use colors from the mixed color palette will take more time to display than colors in the solid palette.

Remember that mouse pointers are bitmaps, too. So depending on the pointer's style and size different amounts of memory are used. The best is to stick to the default black and white pointers. This will also prevent slowdown and flickering that occur with DIVE programs otherwise. Also turn off the comet cursor since it consumes additional memory and processing power.

5.4 WPS stuff

Keep the number of open windows to a minimum. Minimize or close windows that are not necessary, and your screen will refresh faster. Folders that use a "flowed format" will display their icons faster than the standard "non-grid format". This can be changed on the view page of the settings notebook. Also, stick to an 8-point (Warp 3) normal text font for maximum display speed.

Turning off the Desktop animation will also improve your video speed. Do a right-click on the Desktop to bring up the Desktop menu, and select System Setup. Find the System icon and double-click on it. Now click on the Window tab, and disable the animation feature.

Another tip regards the pop-up menu you see when you do a right-click with your mouse. If you know how to move, copy, create a shadow, find, etc., then seeing these options quickly becomes an annoyance. To get rid of these redundant items in Warp 3, add the line SET MENUSTYLE=SHORT to your CONFIG.SYS file and reboot or use XFolder's features to display only the items you want. If you have Warp 4 open the System object, go to the Menu tab and select short menus. There you can also de-select menu bars for folders to save some screen space since all items are included in the context menu anyway.

When you apply changes to a folder's content the system will automatically update the folder view. This can take some time if you have folders with lots of objects, especially if the option Always maintain sort order is activated or/and you are using detailed view. By adding the line SET AUTOREFRESHFOLDERS=NO to your CONFIG.SYS this feature can be turned off. Note however that you will have to close and re-open the folder or select Refresh now from the folder's context menu to have the folder reflect the changes.

5.5 Screensavers

The one catch-word that everyone seems to connect with computer video is "screen-saver". OS/2 has a built-in one that you can activate on the Lock-up page of the Desktop settings notebook. It has several options, among them the options for a timed lock-up, and to lock-up your Desktop at startup. Both of these are a bad idea from a memory consumption point of view. Activating these options won't slow down your video processes as much as they will affect OS/2 memory use. The timed lock-up feature steals working memory away from OS/2, which will slow down all your processes. Turning the lock-up at startup feature on will give the computer more program code to crunch through at boot time. Not the end of the world, but still a slowdown. Basically, if you want to lock-up your computer, you are better off doing it manually from the launchpad, or the pop-up menu.

5.6 Video BIOS

One last thing that affects video speed is copying video routines from slow ROM to fast RAM. This is also referred to as shadow RAM. On most machines, if you hit the DEL key at boot-up time, then you will have access to the BIOS setup screens. Somewhere in there will be references to shadowing video and system ROM. When you find these items, make sure to turn them off. Yes, that's right, I said OFF. The simple reason is that OS/2 has built-in mechanisms to do the same thing as the shadow RAM does. If you don't turn the BIOS shadow RAM off, then you are effectively slowing down the computer by asking it to do things twice. To make matters worse, shadow RAM will take away from the RAM available to OS/2.

6. DOS and Win-OS/2 settings

6.1 Memory setup

The settings EMS_MEMORY_LIMIT, XMS_MEMORY_LIMIT and DPMI_MEMORY_LIMIT directly determine the maximum amount of memory available to a session. However maximum doesn't mean that the specified amount will be used automatically. Instead the session will only use it if a program actually requests it. So it won't be of any use to restrict memory usage to e.g. 1MB if you know that the program never uses more. This setting is especially of interest if certain programs automatically allocate most or all memory that is available, but are also able to work well with less.

Windows software doesn't need EMS memory to run. So you can safely decrease EMS_MEMORY_LIMIT to zero and set EMS_FRAME_LOCATION to NONE. Turning off EMS support saves a small amount of RAM.

6.2 Separated versus shared sessions

With Win-OS/2 it is possible to run several programs either in a shared or in separate sessions. Both modes have specific advantages and disadvantages.

When one uses separate, sessions a complete Win-OS/2 environment is started for each session. Of course memory consumption is much higher than with shared sessions. On the other hand a crash of one Win-OS/2 program won't lead to the others in the same session following and crashing, too. In addition you can specify different settings for each of the separate sessions. This way it is possible to run programs that require mutually exclusive settings at the same time.

6.3 Fonts

As for fonts recommendations for Win-OS/2 are basically the same as for "normal" OS/2.

Font management has been kept separate for OS/2 and Win-OS/2. So fonts that are registered to both systems are loaded again for every Win-OS/2 session and consume additional memory. On the other hand this offers the opportunity of installing only those fonts that are needed.

The Win-OS/2 settings also contain a WIN_ATM option that determines if the Adobe Type1 Font Manager (ATM) and thereby Adobe Type1 fonts will be available to a session. If WIN_ATM is set to ON, ATM and all registered Adobe Type1 fonts will be loaded upon start of the Win-OS/2 session. This is done again for each separate session! So if you e.g. use Aldus Pagemaker for DTP, a good idea is to only register additional Adobe Type1 fonts and to de-activate ATM for all programs that don't need the fonts, thus reducing memory footprint.

6.4 High CPU loads

One of the most pesky problems with many DOS and several Windows applications is that you can see CPU utilization go up to about 100% as soon as the program is started. This happens because DOS programs never had to share resources in the singletasking DOS environment and therefore the developers used constant polling for input, i.e. the software constantly asks the keyboard, the mouse and other devices "Do you have something for me? Do you have something for me?". In just a few seconds between key strokes, a program may poll the keyboard hundreds or even thousands of times. Then if you enter something and the application actually does work instead of waiting for input the CPU load drops and returns to 100% when the polling starts again. This effect can also be observed with badly written Windows applications like MS Money 2.0. Now you might ask "So what? What's the impact on the system?". Well, depending on the polling application it takes away CPU time from other processes, especially those running at idle priority, e.g. the SETI@home client or PMView's loading routine. This can lead to a situation where other programs won't be executed at all.

So what can be done about it? Well, this is a bit complicated since there are several methods and each one does work only with some applications. Some things can be adjusted by the session's settings.

There are two connected options called IDLE_SECONDS and IDLE_SENSITIVITY. After a program issues a request for input, OS/2 waits IDLE_SECONDS before it begins idle time detection. The standard value is zero, i.e. detection begins immediately. The second option specifies a threshold OS/2 uses to determine if a program is idle or not. If the application polls with a higher frequency than specified (in percent) OS/2 will consider it idle, reduce its CPU time and give it to other programs. So by lowering the threshold you should be able to take away some unused CPU time from polling applications.

You can also apply some brute force by setting DOS_BACKGROUND_EXECUTION to OFF. Now, as soon as you take focus away from the offending application and switch to another it is stopped and will only receive CPU time if brought to the foreground again. Of course it won't be able to do calculations for you in the background this way and the problem with taking away resources from background processes while the application is in the foreground still persist.

If the above doesn't work for you there is still some hope. Some people have written TSRs that can release CPU time from the session they run in. They are loaded by adding them to your AUTOEXEC.BAT file. Hobbes' /pub/dos directory and Peter Norloff's OS/2 BBS hold several of these helpers. Most have been written only for a specific application, but the ones called OS/2 Time Slice Releaser (OSTSR), F4_35_CA and TAME provide general services.

OSTSR only is of use for programs that are aware of DesqView, an old DOS multitasking extension software. OSTSR works by fooling DesqView-aware programs into thinking that they are running under Desqview. When such a program makes a request to return the rest of its timeslice to Desqview, the call is intercepted by OSTSR and is turned into a similar request to OS/2. You can specify the amount of CPU time that's released. Try using OSTSR 8. OSTSR is freeware.

F4_35_CA is a freeware tool by Veit Kannegieser. Try adding it to your AUTOEXEC.BAT file and start a DOS or Win-OS/2 application. If the scrolllock LED is turned on F4_35_CA can free some CPU time. See the accompanied file entpack.eng for documentation.

TAME does something different and is more like the OS/2 scheduler itself. It monitors the activity of a program running in its session. Upon detection of idle time, it releases CPU time to other sessions. Additionally, the next time its session gets CPU it will be less tolerant. TAME has lots of options, also containing some that can help to to determine the best settings. Documenting this is far beyond the scope of this article. You may however want to try invoking TAME by adding TAME /TINY /I 9 /TS OS/2 to your AUTOEXEC.BAT file. According to the documentation TAME is shareware (US$20). The last version I was able to find was 3.33 (the 3.34 I found contained the same files) from 1996, so I don't know if it still can be registered.

The programs can be used together. Also remember that you can specify different startup files for sessions using the DOS_AUTOEXEC option if you need different parameters for OSTSR or TAME.

That's it for now. Next month we will close the series with an article about printing and networking. Again: If you have any hints on optimizing networking on OS/2 please drop me a note.

Christian Hennecke is a student of geography from Germany and has been working with OS/2 for five years now. Two years ago he started an OS/2 informational homepage that meanwhile also contains an extensive XFree86/OS2 section called "The X11-Files" as well as information about e.g. emulation on OS/2.

[Previous Page ] [ Index] [Next Page ]
VOICE Home Page: http://www.os2voice.org