Understand the system structure of Informix correctly

Source: Internet
Author: User
Tags data structures informix sessions

The Informix Dynamic server employs a multiple-threaded architecture, which means that a process can accomplish multiple tasks at the same time using multiple threads of its own, so that the entire system requires fewer processes to complete the task of the DBMS.

Dynamic server systems consist of three major components: shared memory, processes, and disks. Shared memory consists of three segments: a resident segment. Virtual segments and message segments. The resident segment is used primarily as a cache of disk data. Virtual segments are used primarily as memory pools to support processes and associated sessions and threads. When a client communicates with a server using shared memory, the message segment is used as a message buffer between the two.

The system also includes several UNIX processes that make up the database server, called OnInit. These processes are referred to as virtual processor (VP) (virtual processors). Each VP is subordinate to a virtual processing class. And each virtual processor class is responsible for accomplishing a specific kind of task.

The system's disk component consists of a plurality of original disk spaces, called Chunk,chunk, with a page as the base unit. Multiple chunk sets logically form the data space (dbspace). The data space is used to store databases, tables, system information, and physical and logical logs. A data space includes at least one chunk.

Shared Memory segment

The shared memory of a dynamic server is composed of three segments:

A resident segment is used primarily as a buffer pool, containing buffers of logical and physical logs and other system data structures. The size of the resident segment is mainly determined by the system parameters buffers.

Virtual segments are used primarily as memory pools to support sessions and threads. Depending on the purpose, the memory pool can be further divided into: Session pool, multiple thread pool, dictionary pool, stored procedure pool, sort pool, large buffer pool, and global pool. The allocation and release of memory pools is dynamic. The Memory pool allocation unit size is 8k. If a virtual segment is exhausted, the dynamic server can dynamically request it again based on the Onconfig parameter. The initial size of the virtual memory segment is determined by the parameter shmvirtsize, whose increment is determined by the parameter shmadd, but the entire shared memory segment cannot be larger than shmtotal.

If the client communicates with the server using shared memory, the message segment is used as the communication buffer. Each user connection (using shared memory for communication) roughly occupies 12K of space. The number of user connections is defined in the parameter nettype.

Users can use the IPCS or ONSTAT-G seg commands to monitor the state of shared memory segments.

Virtual processor (virtual processors)

Virtual Processor Class

oninit cpu类: 运行所有用户线索和部分系统线索(所有线索的95%) 
oninit AIO类: 运行所有内部线索以执行I/O,日志写除外
oninit PIO类: 运行内部线索写物理日志
oninit LIO类: 运行内部线索写逻辑日志
oninit SHM类: 运行共享内存通讯线索
oninit TLI类: 运行内部TLI网络通讯线索
oninit SOC类: 运行内部Sockets网络通讯线索
oninit MSC类: 运行其它任务线索
oninit ADM类: 运行时钟
oninit OPT类: 负责管理BLOB将传至光盘子系统
oninit ADT类: 运行安全审计线索

The database system server consists of several UNIX processes called OnInit, which are called Virtual processor (VP) in the system. All VP are entities that are executable program OnInit. Each VP belongs to a specific virtual processor class, while different virtual processor classes accomplish different tasks. The number of VP that can be contained per virtual processor is determined by the following parameters:

CPU NUMCPUVPS
AIO NUMAIOVPS
PIO 自动启动一个VP。如果物理日志被镜像,将启动两个VP
LIO 自动启动一个VP。如果逻辑日志被镜像,将启动两个VP
SHM NETTYPE
TLI NETTYPE
SOC NETTYPE
MSC 自动启动一个VP
ADM 自动启动一个VP
OPT STAGEBLOB被设置,然后自动启动一个VP
ADT ADTMODE被设置,然后自动启动一个VP

Users can monitor the status of VP using PS or onstat-g glo commands.

Clue

onstat -g ath 显示所有线索 onstat -g act 显示活动线索 onstat -g rea 显示所有就绪线索

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.