The CPU virtual processor runs all session threads (the threads that process requests from SQL client applications) and some internal threads. Internal threads perform services that are internal to the database server. For example, a thread that listens for connection requests from client applications is an internal thread.
The right number of CPU virtual processors is the number at which they are all kept busy but not so busy that they cannot keep pace with incoming requests. You should not allocate more CPU virtual processors than the number of hardware processors in the computer.
To evaluate the performance of the CPU virtual processors while the database server is running, repeat the following command at regular intervals over a set period of time:
onstat -g glo
If the accumulated usercpu and syscpu times, taken together, approach 100 percent of the actual elapsed time for the period of the test, add another CPU virtual processor if you have a CPU available to run it.
For information on deciding how many CPU virtual processors you need, see Running Poll Threads on CPU or Network Virtual Processors.
The VPCLASS parameter allows you to specify all of the following information:
In addition to considering the number of CPUs in the computer and the number of users who will connect to the database server, also consider the fact that user-defined routines and DataBlade modules, which are collections of user-defined routines, run on either CPU virtual processors or user-defined virtual processors. For information on how you assign a user-defined routine to a virtual processor, refer to Assigning a UDR to a User-Defined Virtual-Processor Class.
If you are running multiple CPU virtual processors on a multiprocessor computer, set the MULTIPROCESSOR parameter in the ONCONFIG file to 1. When you set MULTIPROCESSOR to 1, the database server performs locking in a manner that is appropriate for a multiprocessor computer. For information on setting multiprocessor mode, refer to the chapter on configuration parameters in the IBM Informix Dynamic Server Administrator's Reference.
If you are running the database server on a single-processor computer, set the MULTIPROCESSOR configuration parameter to 0. To run the database server with only one CPU virtual processor, set the SINGLE_CPU_VP parameter to 1.
Setting MULTIPROCESSOR to 0 enables the database server to bypass the locking that is required for multiple processes on a multiprocessor computer. For information on the MULTIPROCESSOR configuration parameter, refer to the IBM Informix Dynamic Server Administrator's Reference.
Setting SINGLE_CPU_VP to 1 allows the database server to bypass some of the mutex calls that it normally makes when it runs multiple CPU virtual processors. For information on setting the SINGLE_CPU_VP parameter, refer to the IBM Informix Dynamic Server Administrator's Reference.
Setting the SINGLE_CPU_VP parameter to 1 imposes two important restrictions on the database server, as follows:
You cannot add CPU virtual processors while the database server is in online mode.
For more information, see Adding Virtual Processors in Online Mode.
You can add or drop CPU class virtual processors while the database server is online. For instructions on how to do this, see Adding Virtual Processors in Online Mode and Dropping CPU and User-Defined Virtual Processors.
Some operating systems lower the priority of long-running processes as they accumulate processing time. This feature of the operating system is called priority aging. Priority aging can cause the performance of database server processes to decline over time. In some cases, however, the operating system allows you to disable this feature and keep long-running processes running at a high priority.
To determine if priority aging is available on your computer, check the machine notes file, that comes with your installation and is described in the Introduction to this guide.
If your operating system allows you to disable priority aging, You can disable it by specifying noage for the priority entry in the VPCLASS configuration parameter. For more information, refer to the IBM Informix Dynamic Server Administrator's Reference.
The database server supports automatic binding of CPU virtual processors to processors on multiprocessor computers that support processor affinity. Your database server distribution includes a machine notes file that contains information on whether your database server version supports this feature. When you assign a CPU virtual processor to a specific CPU, the virtual processor runs only on that CPU, but other processes also can run on that CPU.
Use the VPCLASS configuration parameter with the aff option to implement processor affinity on multiprocessor computers that support it.
Figure 21 illustrates the concept of processor affinity.
To see if processor affinity is supported on your UNIX platform, refer to the machine notes file.
To set processor affinity with the VPCLASS parameter, specify the range of CPUs to which you are assigning the virtual processors. The database server assigns CPU virtual processors to CPUs in round-robin fashion, starting with the first processor number that aff specifies. If you specify more CPU virtual processors than there are processors, the database server starts over again at the beginning. In the following example, the affinity entry assigns a virtual processor to CPUs 1, 2, and 3. Three virtual processors (specified in num) are available:
VPCLASS CPU,num=3,aff=1-3
In the following example, the database server assigns two virtual processors to CPUs 5 and 6, and one virtual processor to CPU 7:
VPCLASS CPU,num=3,aff=5-7
For more information, see VPCLASS in the chapter on configuration parameters in the IBM Informix Dynamic Server Administrator's Reference.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]