Settings that affect system resource use

The system resource use of your PowerBuilder components determines how many instances can run on a given system, which in turn determines how many simultaneous clients the application can serve. Tune the settings in Table 3-4 to minimize resource use.

Table 3-4: PowerBuilder component settings that affect resource use

Setting

Description

Component class loader

By default, the PBVM uses per-component class loaders to run components. You can configure components to share class loaders to reduce the memory footprint required to run components. Doing so can improve scalability by allowing more component instances to run in the available memory. For details, see the Sybase white paper Reducing Memory Requirements When Using PowerBuilder Components in EAServer.

DataStore resource footprint

DataStore objects used in components can consume system resources such as memory and Windows user and kernel object handles. When many DataStore objects are instantiated, they can exhaust the available resources unless you have tuned the DataStore settings to minimize resource use. For details on tuning DataStore settings, see the Sybase white paper Operating System Constraints Affecting the Scalability of PowerBuilder DataStores in EAServer.

DataWindow memory management

For large retrievals or imports into a DataWindow object, set the datawindow.storagepagesize property to LARGE. Setting this property allows the DataWindow to most efficiently use the available virtual memory. While the setting LARGE is recommended, a setting of MEDIUM is also available. For more information, see the DataWindow Reference manual in the PowerBuilder documentation.

Bind thread

Disable Bind Thread for PowerBuilder components deployed to EAServer unless you are using a Windows deployment with a PBVM version lower than 8.0.3 and you declare a DataStore as an instance or global variable. Bind Thread is not required in UNIX deployments, Windows deployments with PBVM 8.0.3 or later, or in earlier-version Windows deployments where you only use local variables for DataStore references.

If the Bind Thread property is set to true when you deploy, be sure that the component is in the BindThread instance pool. This is the default pool for components with Bind Thread enabled unless you override the setting.

For more information on threading issues that affect PowerBuilder components, see the Application Techniques manual in the PowerBuilder documentation.

NoteThe Bind Thread property must be set to TRUE in the PowerBuilder IDE if you are using live editing to build your component. Remember to change it to FALSE when deploying your components for production use.

Garbage collection

The PBVM uses a garbage collection model to free memory used by unreferenced and orphaned objects. A garbage collector thread runs periodically to perform this task. You can call the GarbageCollect() PowerScript® function to force garbage collection to occur immediately. Doing so may increase the performance of applications that use huge amounts of memory. For details on how to code components to force garbage collection, see the Sybase white paper Forcing the Garbage Collection Process in PowerBuilder 6.0/7.0/8.0.

For more information on how garbage collection happens in PowerBuilder, see the Application Techniques manual in the PowerBuilder documentation.