diff --git a/content/en/docs/Developerguide/administration.md b/content/en/docs/Developerguide/administration.md deleted file mode 100644 index 01d1effd3446f45984f6ef5a2c5e238c4f419ced..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/administration.md +++ /dev/null @@ -1,14 +0,0 @@ -# Administration - -The following describes various MOT administration topics – - -- **Durability** -- [Logging – WAL Redo Log](logging-wal-redo-log.md) -- [Recovery](recovery.md) -- [Replication and High Availability](replication-and-high-availability.md) -- [Memory Management](memory-management.md) -- [Vacuum](vacuum.md) -- [Statistics](statistics.md) -- [Monitoring](monitoring.md) -- [Error Messages](error-messages.md) - diff --git a/content/en/docs/Developerguide/benchmarksql-an-open-source-tpc-c-tool.md b/content/en/docs/Developerguide/benchmarksql-an-open-source-tpc-c-tool.md deleted file mode 100644 index 59b612cb8be0d78b114e73651f2d29ca7c940653..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/benchmarksql-an-open-source-tpc-c-tool.md +++ /dev/null @@ -1,39 +0,0 @@ -# BenchmarkSQL – An Open-Source TPC-C Tool - -For example, to test TPCC, the **BenchmarkSQL** can****be used, as follows – - -- Download **benchmarksql** from the following link – [https://osdn.net/frs/g\_redir.php?m=kent&f=benchmarksql%2Fbenchmarksql-5.0.zip](https://osdn.net/frs/g_redir.php?m=kent&f=benchmarksql%2Fbenchmarksql-5.0.zip) -- Under run/sql.common, adjust the schema creation scripts to MOT syntax and avoid unsupported DDLs. Alternatively, the adjusted scripts can be directly downloaded from the following link – [https://opengauss.obs.cn-south-1.myhuaweicloud.com/1.0.0/sql.common.opengauss.mot.tar.gz](https://opengauss.obs.cn-south-1.myhuaweicloud.com/1.0.0/sql.common.opengauss.mot.tar.gz) - -> **NOTE:** ->The benchmark test is executed using a standard interactive SQL mode without stored procedures. - -## Setting Up and Running BenchmarkSQL - -The following describes how to set up and run a BenchmarkSQL test: - -- TPCC Configuration - -Configure TPC-C as follows: - -- Full Transactions – 5 -- Standard Workload Distribution: - - newOrderWeight=45 - - paymentWeight=43 - - orderStatusWeight=4 - - deliveryWeight=4 - - stockLevelWeight=4 - -- Number of Warehouses – 512 Warehouses - -## Running the Benchmark - -Anyone can run the benchmark by starting up the server and running the **benchmarksql** scripts. - -To run the benchmark - -1. Go to the client folder and link **sql.common** to **sql.common.opengauss.mot** in order to test MOT. -2. Start up the database server. -3. Configure the **props.pg** file in the client. -4. Run the benchmark**.** - diff --git a/content/en/docs/Developerguide/calc-checkpoint-algorithm-low-overhead-in-memory-and-compute.md b/content/en/docs/Developerguide/calc-checkpoint-algorithm-low-overhead-in-memory-and-compute.md deleted file mode 100644 index df686ce3c47cca60704ecdd9f9aa385b796bda4a..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/calc-checkpoint-algorithm-low-overhead-in-memory-and-compute.md +++ /dev/null @@ -1,8 +0,0 @@ -# CALC Checkpoint algorithm: low overhead in memory and compute - -The checkpoint algorithm provides the following benefits - -- Reduced memory usage: At most two copies of each record are stored at any time. Memory usage is minimized by only storing one physical copy of a record when its live and stable versions are equal or when no checkpoint is actively being recorded. -- Low overhead. CALC's overhead is smaller than other asynchronous checkpointing algorithms. -- Uses virtual points of consistency. CALC does not require quiescing of the database in order to achieve a physical point of consistency. - diff --git a/content/en/docs/Developerguide/checkpoint-activation.md b/content/en/docs/Developerguide/checkpoint-activation.md deleted file mode 100644 index 296d6194fed1170f102bdf2856dc0d32b22e7708..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/checkpoint-activation.md +++ /dev/null @@ -1,6 +0,0 @@ -# Checkpoint Activation - -MOT checkpoints are integrated into the envelope's checkpoint mechanism. The process can be triggered manually by executing “**CHECKPOINT;**” command or by automatically considering the envelope's triggering settings \(time/size\). - -Checkpoint configuration is done in the mot.conf file – see the relevant [Default MOT.conf](default-mot-conf.md). ++ - diff --git a/content/en/docs/Developerguide/checkpoint.md b/content/en/docs/Developerguide/checkpoint.md deleted file mode 100644 index 7482d69a8bcfb7c01188288828dbc6f9363edb0d..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/checkpoint.md +++ /dev/null @@ -1,19 +0,0 @@ -# Checkpoint - -In openGauss the Checkpoints are points in the sequence of transactions at which it is guaranteed that the heap and index data files have been updated with all information written before the checkpoint. - -At checkpoint time, all dirty data pages are flushed to disk and a special checkpoint record is written to the log file. - -The MOT does not store its data like openGauss does and there is no dirty pages concept. The data is stored directly in memory. - -For this reason we have researched and implemented the CALC algorithm described in the paper Low-Overhead Asynchronous Checkpointing in Main-Memory Database Systems, SIGMOND 2016 from Yale University. - -Reference to CALC footnote: - -K. Ren, T. Diamond, D. J. Abadi, and A. Thomson. Low-overhead asynchronous checkpointing in main-memory database systems. In Proceedings of the 2016 ACM SIGMOD International Conference on Management of Data, 2016. - -- **[CALC Checkpoint algorithm: low overhead in memory and compute](calc-checkpoint-algorithm-low-overhead-in-memory-and-compute.md)** - -- **[Checkpoint Activation](checkpoint-activation.md)** - - diff --git a/content/en/docs/Developerguide/checkpoint_mot.md b/content/en/docs/Developerguide/checkpoint_mot.md deleted file mode 100644 index a87914582824e087d2d34916876afaf5e7fb778b..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/checkpoint_mot.md +++ /dev/null @@ -1,24 +0,0 @@ -# CHECKPOINT \(MOT\) - -- enable\_checkpoint = true - - Specifies whether to use periodic checkpoint. - - -- checkpoint\_dir = - - Specifies the directory in which checkpoint data is to be stored. The default location is in the data folder of each data node. - - -- checkpoint\_segsize = 16 MB - - Specifies the segment size used during checkpoint. Checkpoint is performed in segments. When a segment is full, it is serialized to disk and a new segment is opened for the subsequent checkpoint data. - - -- checkpoint\_workers = 3 - - Specifies the number of workers to use during checkpoint. - - Checkpoint is performed in parallel by several MOT engine workers. The quantity of workers may substantially affect the overall performance of the entire checkpoint operation, as well as the operation of other running transactions. To achieve a shorter checkpoint duration, a larger number of workers should be used, up to the optimal number \(which varies based on the hardware and workload\). However, be aware that if this number is too large, it may negatively impact the execution time of other running transactions. Keep this number as low as possible to minimize the effect on the runtime of other running transactions. When this number is too high, longer checkpoint durations occur. - - diff --git a/content/en/docs/Developerguide/checkpoints.md b/content/en/docs/Developerguide/checkpoints.md deleted file mode 100644 index a0e4a667765488d695c7dc6e0d752f5a4cb03319..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/checkpoints.md +++ /dev/null @@ -1,19 +0,0 @@ -# Checkpoints - -A Checkpoint is the point in time at which all the data of a table's rows is saved in files on persistent storage in order to create a full durable database image. It is a snapshot of the data at a specific point in time. - -A Checkpoint is required in order to reduce a database's recovery time by shortening the quantity of WAL \(Redo Log\) entries that must be replayed in order to ensure durability. Checkpoint's also reduce the storage space required to keep all the log entries. - -If there were no Checkpoints, then in order to recover a database, all the WAL redo entries would have to be replayed from the beginning of time, which could take days/weeks depending on the quantity of records in the database. Checkpoints record the current state of the database and enable old redo entries to be discarded. - -Checkpoints are essential during recovery scenarios \(especially for a cold start\). First, the data is loaded from the last known or a specific Checkpoint; and then the WAL is used to complete the data changes that occurred since then. - -For example – If the same table row is modified 100 times, then 100 entries are recorded in the log. When Checkpoints are used, then even if a specific table row was modified 100 times, it is recorded in the Checkpoint a single time. After the recording of a Checkpoint, recovery can be performed on the basis of that Checkpoint and only the WAL Redo Log entries that occurred since the Checkpoint need be played. - -## Configuring Checkpoints - -Checkpoint configuration is performed in the CHECKPOINT; section of the mot.conf file. You may refer to the [CHECKPOINT \(MOT\)](checkpoint_mot.md)section of this user manual for a description of these configuration parameters. - -> **NOTE:** ->In a production deployment, the value must be TRUE \#enable\_Checkpoint = true. A FALSE value can only be used for testing. - diff --git a/content/en/docs/Developerguide/comparison-disk-vs-mot.md b/content/en/docs/Developerguide/comparison-disk-vs-mot.md index bf9415bc1ae254f78154acdc7a217c52a7e1eb65..193f3c0adc8712791bb3c94509f5ea38baca1fab 100644 --- a/content/en/docs/Developerguide/comparison-disk-vs-mot.md +++ b/content/en/docs/Developerguide/comparison-disk-vs-mot.md @@ -1,108 +1,400 @@ -# Comparison – Disk vs. MOT - -The following table briefly compares the various features of a openGauss Disk-based storage engine and a MOT storage engine. - -**Table 1** Comparison – Disk vs. MOT - - -
+ | ++ | +
---|---|
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Advanced RISC Machine, a hardware architecture alternative to x86 + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Data Definition Language. Database Schema management language + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Intermediate Representation of a source code, used in compilation and optimization + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Low-Level Virtual Machine, refers to a compilation code or queries to IR + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Memory Optimized Tables storage engine (SE), pronounced as /em/ /oh/ /tee/ + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +Transactions-per-minute-C. A performance metric for TPC-C benchmark that counts new-order transactions. + |
+
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | +A PostgreSQL implementation of transaction logging (WAL - described above) + |
+
- | -- | -- | -
---|---|---|
- - | -- - | -- | -
- - | -- | -- | -
- - | -- | -- | -
- - | -- | -- | -
- - | -- | -- | -
- - | -- | -- | -
- - | -- | -- | -
- - | -- | -- | -
- Cannot add column %s; as the number of declared columns exceeds the maximum declared columns. - |
-- - | -- - | -
- - | -- - | -- | -
- Total number of indexes for table %s is greater than the maximum number of indexes allowed %u. - |
-- - | -- | -
- Maximum number of DDLs per transaction reached the maximum %u. - |
-- - - - | -- | -
- - - | -- - | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- NULL value cannot be inserted into non-null column %s at table %s. - |
-- | -- | -
- - | -- | -- | -
- | -- | -- | -
- | -- | -- | -
- | -- | - | -
- | -- | - - | -
- | -- | - - | -
- | -- | - - | -
- | -- | - - | -
- | -- | - - | -
- | -- | - - | -
Alter table operation is not supported for memory table. -Cannot create MOT tables while incremental checkpoint is enabled. - - |
-- | - - | -
- | -- | - | -
- | -- | - | -
- | -- | - - | -
You have reached a maximum logical capacity %lu of allowed %lu. - |
-- | - - | -
- | -- | -
---|---|
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
- | -- | -
+ | ++ | +
---|---|
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | +
+ | ++ | ++ | +
---|---|---|
+ + | ++ + | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ + | ++ | ++ | +
+ Cannot add column %s; as the number of declared columns exceeds the maximum declared columns. + |
++ + | ++ + | +
+ + | ++ + | ++ | +
+ Total number of indexes for table %s is greater than the maximum number of indexes allowed %u. + |
++ + | ++ | +
+ Maximum number of DDLs per transaction reached the maximum %u. + |
++ + + + | ++ | +
+ + + | ++ + | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ NULL value cannot be inserted into non-null column %s at table %s. + |
++ | ++ | +
+ + | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | + | +
+ | ++ | + + | +
+ | ++ | + + | +
+ | ++ | + + | +
+ | ++ | + + | +
+ | ++ | + + | +
+ | ++ | + + | +
Alter table operation is not supported for memory table. +Cannot create MOT tables while incremental checkpoint is enabled. + + |
++ | + + | +
+ | ++ | + | +
+ | ++ | + | +
+ | ++ | + + | +
You have reached a maximum logical capacity %lu of allowed %lu. + |
++ | + + | +
+# MOT Isolation Levels
+
+Even though MOT is fully ACID-compliant \(as described in the section\), not all isolation levels are supported in openGauss 1.0. The following table describes all isolation levels, as well as what is and what is not supported by MOT.
+
+**Table 1** Isolation Levels
+
+
+
|
---|
+ | ++ | ++ | ++ | +
---|---|---|---|
+ | ++ | ++ | ++ | +
+ | ++ | ++ | ++ | +
+ | ++ | ++ | ++ | +
+ | ++ + | +Checkpoint: algorithm fails or failure to retrieve table data or indexes. + |
+ + | +
+ | + | ++ | +
---|---|---|
+ | ++ | ++ | +
+ | ++ | ++ |
+ | ++ | ++ | +
+ | ++ | ++ |
+ | + | + | +
+ | + |
+ (in READ-COMMITTED this will succeed, in SERIALIZABLE it will fail) + |
+
+ | + | + | +
+ | + | ++ | +
---|---|---|
+ | ++ | ++ | +
+ | ++ | ++ |
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | + | + | +
+ | + | + | +
+ | + | + | +
+# MOT Sample TPC-C Benchmark
+
+## TPC-C Introduction
+
+The TPC-C Benchmark is an industry standard benchmark for measuring the performance of Online Transaction Processing \(OLTP\) systems. It is based on a complex database and a number of different transaction types that are executed on it. TPC-C is both a hardware‑independent and a software-independent benchmark and can thus be run on every test platform. An official overview of the benchmark model can be found at the tpc.org website here – [http://www.tpc.org/default5.asp](http://www.tpc.org/default5.asp).
+
+The database consists of nine tables of various structures and thus also nine types of data records. The size and quantity of the data records varies per table. A mix of five concurrent transactions of varying types and complexities is executed on the database, which are largely online or in part queued for deferred batch processing. Because these tables compete for limited system resources, many system components are stressed and data changes are executed in a variety of ways.
+
+**Table 1** TPC-C Database Structure
+
+
+
|
---|
+ | ++ | ++ | +
---|---|---|
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
+ | ++ | ++ | +
- | - | -- | -
---|---|---|
- | -- | -- | -
- | -- | -- |
- | -- | -- | -
- | -- | -- | -
- | - | - | -
- | - | - | -
- | - | - | -
- | -- | -
- | -|
- | -|
- | -
- | - | -- | -
---|---|---|
- | -- | -- | -
- | -- | -- |
- | -- | -- | -
- | -- | -- |
- | - | - | -
- | - |
- (in READ-COMMITTED this will succeed, in SERIALIZABLE it will fail) - |
-
- | - | - | -
+ | +