Set the number of virtual processors
The dynamic, multithreaded nature of a virtual processor allows it to perform parallel processing. Virtual processors of the CPU class can run multiple session threads, working in parallel, for an SQL statement contained within a UDR.
You can increase the
number of CPU virtual processors with the VPCLASS configuration parameter
in the onconfig file. For example, the following
parameter specifies that the database server should start four virtual
processors for the cpu class:
VPCLASS cpu,num=4
Tip: Debugging is more difficult when you have more than one
CPU because threads can migrate between processes. The database server
communication mechanism uses the SIGUSR1 signal. When you are debugging,
you must avoid SIGUSR1 to prevent database server processes from hanging.
On Windows™, all virtual processors share the same process space. Therefore, you do not need to start multiple instances of Java™ VPs to execute Java™ UDRs in parallel. On UNIX™, the database server must have multiple instances of JVPs to parallelize Java™ UDR calls. Because the Java™ Virtual Machines that are embedded in different VPs do not share states, you cannot store global states with Java™ class variables. All global states must be stored in the database to be consistent.