...
In the case of sending packets in the replication, the following calculation formula is able for each transaction type.
Type | Size (byte) |
---|---|
INSERT | 헤더Header(28byte) + (데이터길이Data length(4byte) + 데이터Data(x)) |
UPDATE | 헤더Header(32byte) + (PK데이터길이PK data length(4byte) + PK데이터PK data(x)) + (변경 전 데이터 길이Data length before change(4byte) + 변경 전 데이터Data before change(x)) + (변경 후 데이터 길이Data length after change(4byte) + 변경 후 데이터Data after change( x)) |
DELETE | 헤더Header (28byte) + (PK데이터길이PK data length (4byte) + PK데이터PK data (x)) |
Commit / Rollback | 16byte |
위와 같이 각 트랜잭션 별로 기본적인 헤더를 가지고 있으며, 전송되는 데이터에 대하여 컬럼별 길이 정보와 실 데이터의 길이를 모두 합산한 크기만큼 패킷을 전송한다.
As above, each transaction has a basic header, and the packet is sent as much as the sum of length information for each column and the length of actual data for sent data.
In a replication environment, INSERT needs to send all column data, and UPDATE only needs to send previous information and change information of the changed column data. DELETE can be processed by sending only the PK data of the data to be deleted.
Using the above calculation formula, if data input of 300 bytes in size to a replication table with 10 columns needs to be processed at 10,000 tps per second, it can be calculated as follows.
Type | Example of calculation |
---|---|
INSERT | (28 + (4*10) + 300 + 16) * 10,000 = 3.66Mbps |
- 28 bytes are used as the header of the replication send log per case - The meaning of 4*10 means 4 bytes of length information about the actual length of each column. - 300byte means the length of data to be sent. -16 means Commit or Rollback log. |
In the above environment, in order to meet user requirements, an environment that guarantees the network speed of 3.66Mbps based on the insert transaction is required.
In building the actual environment, correction factors for data increase or other factors should be applied. In terms of margin, it is recommended to build a network environment with at least a 30% increase.
As for the replication network card, a Giga-bit card is recommended, and a direct connection using a cross-cable or a private network is recommended.
However, if it is not a short distance, it is necessary to consider in advance whether the replication can be processed without delay within the available network bandwidth.
Overview
...
In this chapter, we have discussed how to calculate the CPU, memory, disk, and network capacity required for Altibase.
However, when estimating the capacity of a database system, there isn't much to consider for each item, so when configuring an actual system, it is desirable to find the most suitable configuration method with the review of sufficient data in advance.