HP-UX 11i Systems Administration Handbook and Toolkit
Authors: Poniatowski M.
Published year: 2003
Pages: 134-136/301
Buy this book on amazon.com >>

Specifying Appearance and Behavior

You need to know only two tricks to specifying appearance and behavior resources in configuration files. The first is to specify the resource and its value correctly. The second is to specify the resource and value in the correct configuration file.

Two caveats involve colors and fonts. The CDE style manager provides a graphical interface for modifying colors and fonts. However, if you specify an application's color or font directly, this specification will override the ability of the style manager to manage that resource for the application.

Typical ways to specify a color or font directly include the following:

  • Type the specification on the command line as a startup option.

  • Include the specification in the application's app-defaults file.

  • Use the xrdb utility to add resources for the application to the resource database.


The Sequence of Events When CDE Starts

The following section is a blow-by-blow account of what happens when a user logs into CDE. In this particular account, assume a distributed topology like a diskless cluster. The account begins with the boot of the hub system and nodes in step 1. By step 4, X servers are running on each node and login screens are being displayed. By step 6, the user is logged in. By step 11, the session manager is busy re-creating the user 's session.

  1. The dtlogin executable is started as part of the init process that occurs during the system boot sequence on the hub machine and each cluster node.

  2. dtlogin reads /usr/dt/config/Xconfig to get a list of resources with which to configure the login process. This is where dtlogin first learns about files such as Xaccess, Xservers, Xresources, Xstartup, Xsession , and Xreset and gets the values of a number of appearance and behavior resources.

  3. dtlogin reads two files in /usr/dt/config :

    • Xservers or the file identified by the Dtlogin*servers resource setting in Xconfig .

    • Xresources or the file identified by the Dtlogin*resources resource setting in Xconfig .

  4. dtlogin starts an X server and a child dtlogin for each local display.

  5. Each child dtlogin invokes dtgreet , the login screen.

  6. When a login and password are validated , a child dtlogin sets certain environment variables to default values.

  7. The child dtlogin runs /usr/dt/config/Xstartup .

  8. The child dtlogin runs /usr/dt/config/Xsession .

  9. Xsession runs dthello , the copyright screen.

  10. Xsession reads $HOME/.dtprofile , setting any additional environment variables or overwriting those set previously by dtlogin .

  11. The child dtlogin invokes the session manager, dtsession .

  12. dtsession restores the appropriate session. For example, to restore the current session, dtsession reads dt.resources and dt.session in $HOME/.dt/sessions/current .

At logout, the reverse happens. The session is saved and dtlogin runs /usr/dt/config/Xreset . After Xreset completes, dtlogin again displays the login screen, as in step 4.


CDE and Performance

CDE isn't a monolithic application; it's a set of components layered on top of the operating system, the X Window System, and Motif. Each underlying layer takes its share of RAM before CDE or any other client even starts. Because of the low-level nature of these layers , the RAM they use is hardly ever regained through swapping to disk.

In some cases, operating system overhead and user application requirements restrict the amount of RAM available for a graphical user interface to little more than enough to run a window manager such as Motif. Because the CDE workspace manager and the Motif window manager take roughly the same amount of RAM, users can enjoy an enriched graphical environment with the added value of CDE's multiple workspaces at essentially no extra RAM cost over running the Motif window manager.

Tactics for Better Performance

Unless all your users have RAM-loaded powerhouses for systems, you will need to spend some time developing a performance strategy. If you conceive of performance as a bell-shaped curve, satisfaction lies on the leading edge. Your performance strategy should do everything it can to keep your users on the leading edge.

Probably the most logical approach is to start small and grow. In other words, start out with minimal user environments on all the systems on your network. Gradually add software components until you or your users begin to notice performance degradation. Then back off a little. Such an approach might take several weeks or more to evaluate, as you add components and as your users spend several days actually working in the environment to determine the effect of your changes on system performance and their frustration levels.

The most RAM-expensive pieces of CDE are the workspace manager, the session manager, and the file manager. The workspace manager is expensive because portions of it are always in RAM ( assuming that you are moving windows around and switching workspaces). The CDE workspace manager is no more expensive than the Motif window manager; if you want a GUI, it's just a price you have to pay. The session manager is expensive only during logout and login, as it saves and restores sessions. The rest of the time, the session manager is dormant and gets swapped out of RAM. Saving your current work session is nice at the end of the day, but it's something to consider giving up if you want to improve your login and logout performance. The file manager is expensive because it wakes up periodically and jumps into RAM to check the status of the file system and update its file manager windows . When it jumps into RAM, it pushes something else out, for example, perhaps the desktop publishing program you're using.

Here are some other ideas that you may find useful:

Terminal Emulators

xterms are a little less RAM-expensive than dtterms . Unless you need the block mode functionality of a dtterm, xterm might be a better choice for terminal emulation.

Automatic Saves

Some applications automatically save data at periodic intervals. Although this feature can be beneficial, you need to evaluate its effect in light of performance. If the application is central to your users' work, fine, but if not, you might want to disable the automatic save feature.

Scroll Buffers

Large scroll buffers in terminal emulators can be a real convenience, but they can also take up a lot of RAM. Even modestly sized scroll buffers, when multiplied by three or four terminal emulators, consume a lot of RAM.

Background Bitmaps

Avoid large bitmaps; they increase the X server size. Especially avoid switching large bitmaps frequently within a session. If you are hunting for a new background, be sure to restart the X server after you've found the one you want and have included it in the proper sessionetc file. The most efficient bitmaps are small ones that can be repeated to tile the background.

Front Panel

Reconfigure the front panel to minimize the number of buttons . Keep just enough to meet user needs. This tactic decreases the workspace manager size in RAM and speeds login and logout.

Pathnames

Whenever possible, use absolute pathnames for bitmap specifications. Although this approach decreases the flexibility of the system, it speeds access time.

HP-UX 11i Systems Administration Handbook and Toolkit
Authors: Poniatowski M.
Published year: 2003
Pages: 134-136/301
Buy this book on amazon.com >>