1 year ago
#334252
Lokesh Kumar P
HyperSQL performance in relation with number of parallel connections
Harware setup:
CPU: Intel i5-8 core machine
Memory: 16 GB
Disk: SSD
DB: HyperSQL 2.6.0 (JDK 8)
(Running HyperSQL as a docker container with no extra config, running default config)
Test scenario:
In-Memory Table with 40 cols and 413,000 rows with index on 4 cols (not combined)
Running a java client which simulates 1200 queries executing in a fixed thread pool of size 120. So 1 thread executing 120 requests in a loop OR 120 queries executing in parallel.
Type of queries:
select x,y,sum(z),count(distinct a)
from table
where b like '%val%'
and c != 'val'
and d is not null
group by x,y
order by sum(z) desc
limit 100
The avg response time is measured at the end of execution and this metric is dependent on the number of connections present in the connection pool. The readings are given in the below table.
Here the Avg is mean not median
Connection pool size | Avg Response time per query | Avg pool wait time for connection |
---|---|---|
500 | 14 secs | 0.3 secs |
50 | 10 secs | 9 secs |
25 | 2.8 secs | 5.7 secs |
20 | 2.3 secs | 6.1 secs |
15 | 2 secs | 7.2 secs |
But in the HyperSQL documentation, there is a statement where it says that the performance should not be dependent on the number of parallel connections
HyperSQL is fully multi threaded. If the vast majority of operations are read operations, then performance is very high in all transaction models. Multiple processes, each running in a different thread, can access the same tables or rows at the same time and return the results independently to the user's application(s).
Can someone please explain this behavior and ways to improve the query performance even when there are higher number of connections to the HyperSQL DB.
java
performance
hsqldb
hypersql
0 Answers
Your Answer