4 Informix Dynamic Server 11: Advanced Functionality for Modern Business
1.1.1 DSA components: Processor
IDS provides the unique ability to scale the data system by employing a
dynamically configurable pool of data server processes called
Virtual Processors
(VPs). Database operations, such as a sorted data query, are segmented into
task-oriented subtasks (data read, join, group, and sort, as examples) for rapid
processing by Virtual Processors that specialize in that type of subtask. Virtual
Processors mimic the functionality of the hardware CPUs in that those VPs
schedule and manage user requests using multiple, concurrent threads. This is
illustrated in Figure 1-1.
Figure 1-1 IDS pool of VPs for parallel task execution
A thread represents a discrete task within a data server process and many
threads can execute simultaneously, and in parallel, across the pool of Virtual
Processors. Unlike a CPU process-based (or single-threaded) engine, which
leaves tasks on the system CPU for its given unit of time (even if no work can be
done, and thus wasting processing time), Virtual Processors are multi-threaded.
Consequently, when a thread is either waiting for a resource or has completed its
task, a thread switch occurs and the Virtual Processor immediately works on
another thread. As a result, precious CPU time is not only saved, but it is used to
satisfy as many user requests as possible in the given amount of time. This
CPU-1 CPU-2 CPU-3 CPU-4
CPU AIO
ENCRYPT
UD-VP
Virtual processors
Shared Memory
Buffers
Session
Info
SQL
Cache
Message
Chapter 1. IBM Informix Dynamic Server 11 essentials 5
enables an efficient use of hardware resources and is referred to as
fan-in
parallelism
. It is illustrated in Figure 1-2.
Figure 1-2 Fan-in parallelism
Not only can one Virtual Processor respond to multiple user requests in any
given unit of time, but one user request can also be distributed across multiple
Virtual Processors. For example, with a processing-intensive request, such as a
multi-table join, the data server divides the task into multiple subtasks and then
spreads these subtasks across all available Virtual Processors. Fan-out
parallelism uses many VPs to process a single SQL operation. With the ability to
distribute tasks, the request is completed quicker. This is referred to as
fan-out
parallelism
and is illustrated in Figure 1-3.
Figure 1-3 Fan-out parallelism
Virtual Processor
Processor
Physical
User 1 User 2 User 3 User 4 User 5
Processor 1
Physical
Processor 2
Physical
Processor 3
Physical
Virtual Processor 1 Virtual Processor 2 Virtual Processor 3
6 Informix Dynamic Server 11: Advanced Functionality for Modern Business
Together with fan-in parallelism, the net effect is more work being accomplished
quicker than with single-threaded architectures; in other words, the data server is
faster.
Dynamic load balancing occurs within IDS, because threads are not statically
assigned to Virtual Processors. Outstanding requests are serviced by the first
available Virtual Processor, balancing the workload across all available
resources. For efficient execution and versatile tuning, Virtual Processors can be
grouped into classes, each of which is optimized for a particular function, such as
CPU operations, disk I/O, communications, and administrative tasks, as
illustrated in Figure 1-4.
Figure 1-4 VPs are grouped into classes and optimized by function
An administrator can configure the instance with the appropriate number of
Virtual Processors in each class to handle the workload. Adjustments can be
made while the instance is online without interrupting database operations in
order to handle occasional periods of heavy activity or different load mixes. With
IDS 11, the data server in certain cases automatically adjusts the mix of VPs to
meet the current workload.
In UNIX and Linux systems, the use of multi-threaded Virtual Processors
significantly reduces the number of UNIX and Linux processes and,
consequently, less context switching is required. In Microsoft Windows systems,
Dynamically tunable
Parallelized, multi-threaded,
data server operating system
Faster context switching
Better scheduling
Better locking
Dynamic memory
CPU VP
Communication VPs
TCP/IP, Shared Memory, etc.
AIO VP
Administration VP
User-defined VP
Spatial VP
IDS Data Server

Get Informix Dynamic Server 11: Advanced Functionality for Modern Business now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.