eXtremeDB Performance tuning

来源:互联网 发布:哪里可以买到淘宝号 编辑:程序博客网 时间:2024/06/14 01:50

ID

Items

Details&procedures

Purpose

1

Routine work.

Arch learning,  eXtremeDB usage learning,  code learning, check with perf.

Have a general idea for the whole architecture.

2

Multi-thread

Accessing in parallel.

Utilize the multi-core of the system which could enhance the performance a lot.

3

MURSIW

Change the library linkage from MVCC to MURSIW.

Reduce the cost for MURSIW is more proper for MURSIW.

4

page size

Change the initial page_size for mdb to 4K from 256.

Reduce the cost.

5

List removal

Remove the test index in all the table if possible.

Reduce the commit burden.

6

Btree/Hash

Btree/Hash  in schema and related function called.

Hash is 2 times faster than Btree according the test of 08-perf-general.

7

Delete unnecessary transaction.

Delete unnessary transaction.

Remove Unnecessary code.

8

Compound index eXtremeDB optimization.

A、Class a {

tree<A,B> idx1;
tree<A,B,C> idx2;
}
                      B、Class a{
                              …
                             Tree<A,B,C,D> idx1;
                              Tree<A,B,E,D> idx2; (  tree<A,B,D> idx3 could  be used to)
}

Reduce the cost when update related table.

9

Build optimization

Use -O3, debug option checking
Remove -g
Difine the macro to not use D_DEBUG

Upgrade optimization

10

Use newer version of GCC

Use newer version of GCC (current is 4.1.2, recommended is 4.8.X or above) with -O3 optimization level.
Test on 173 with current version, and backup and use the newest version in a separate directory.

See if the gcc version could improve the performance.

11

Schema readjustment.

Move the indexed field at the beginning of the class declaration.

 

12

Transaction with readonly first and update later.

Move the readonly to the beginning and write later using update.

Reduce the time of usage of RW and therefor reduce the cost of the related locks usage.

13

Clear all the unnecessary logic in the transaction.

Logic adjustment.

Reduce the code length especially in loops.

14

Fixed structure

Use the fixed function to do the batch insert , get or update.

Batch operation.

15

HA involved.

Add HA related fucntion to get HA involved.

HA could used for expand the ability of reading for the secondary mode.

16

User guide

Chapter Database Design and Implementation

Learn from the user-guide .

0 0