-
Notifications
You must be signed in to change notification settings - Fork 10
BenchMark
We perform tests on a cheap cloud machine, 1-core 2.6GHz Intel Xeon CPU, 2.0 G memory and 100GB HDD, without SSD acceleration. We put Swap files on a separate directory for the use of Lunar virtual memory. Here is what the system configured:
CPU:
[rocku@iz25damtesuZ ~]$ cat /proc/cpuinfo
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
cpu MHz : 2593.427
cache size : 20480 KB
......
Memory:
[rocku@iz25damtesuZ ~]$ grep MemTotal /proc/meminfo
MemTotal: : 1920740KB
LunarBase has real-time mode and virtual memory enabled, full index mode disabled. The maximum physical memory use for each searchable column will be 256MB = 1<<28, and maximum 256k = 1 << 18 hot records will be kept in cache. Can be more if your budget allows:
#....................#
cache_records_in_memory = 18
#....................#
full_index_mode = off
rt_mode = on
rt_mem_page_size = 12
rt_virtual_mem_enabled = on
rt_max_memory = 28
rt_max_virtual_pte = 12
rt_vm_swap = /data/rocku/DBTest/Swap
Consult three modes of how LunarBase works to get a whole picture of it. At present, the full index mode is not supported officially.
Consult LunarMax to learn how LunarBase virtual memory system works, how it controls physical memory use, avoiding resource race on a server and what is the performance.
The testing data set has 5,000,000 order records, 1,000,000 users and 100,000 products. Join user data and order data by denormalizing columns into a materialized view named user_order_view. Then the view has joined columns name, payment, product, time_stemp, age, degree, address, favorite, score,
among which name, payment and product are searchable.
Here is the system status when the test was running:
Cpu(s): 67.1%us, 34.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st,
Mem: 1920740k total, 1850736k used, 70308k free, 14932k buffers
Swap: 0k total, 0k used, 0k free, 601032k cached
Be noticed, here the Swap printed out is the Linux Swap, not the LunarBase Swap.
PID USER PR NI VIRT RES SHR S %CPU %MEM
18400 rocku 20 0 4464m 719m 5488 S 99.2 38.3
Since we have 3 searchable columns, and each has memory limitation 256MB, so the total physical memory use is 719MB in this test.
#Report of Insert:
dbname = /data/rocku/DBTest/RTSeventhDB
total records = 5,000,000
maximum 5000 insert takes 1138625519 ns
minimum 5000 insert takes 94372679 ns
average 5000 insert takes 395830329 ns
total time: 395.8303 s
Apparently, more searchable columns costs more time to insert.
#Report of range query and point query:
dbname = /data/rocku/DBTest/RTSeventhDB
search table = order_user_view
search columns = payment, name, product
total records = 5,000,000
average records in range = 1236 recs
total searches = 25,000,000
search result having maximum 1500 records takes(ms): 2981.41255 (ms)
average range query costs(ms): 25.0063029 (ms)
average point query costs(ms): 0.016008400 (ms)
1 Home
1.1 summary
1.2 System Preparation
1.3 When LunarBase is your best choice
1.4 Benchmark
1.5 Power consumption
2 Data Model And Process
2.1 Why internal big cache
2.2 Memory Management: LunarMMU
2.3 Garbage Collection
2.4 Transaction Log
2.5 JOIN via materialized view
3 Real Time Computation: LunarMax
3.1 In-Memory File System: Memory Estimation
3.2 Configuration
3.3 Use SSD as a cheaper memory
3.4 Data Safety
3.5 HE Server VS. Cluster
3.6 High Availability
4 Create a database
4.1 Three modes
4.2 creation.conf settings
4.3 Table space
4.4 Multiple Instance
4.5 Database Status
4.6 Remove and Restore a table
5 Insertion
5.1 Insert as normal record
5.2 Insert to search engine
6 Query
6.1 Point Query
6.2 Result Handler: register your own event handler
6.3 Interpreter Pattern: complex query conditions
6.4 Range Query
6.5 Full-text Search
6.6 Algebraic Logical Query
8 Deletion
9 Materialized view
9.1 Eventual consistency
9.2 Update
9.3 MVCC in LunarBase
9.4 Easy JOIN via denormalization
9.5 CRUD in view
10 Distributed integration with
10.1 Kafka
10.2 Storm
10.3 Spark
11 Storage: Lunar Virtual File System
13 Roadmap of LunarBase future
15 FAQ