After my first post Analyzing air traffic performance with InfoBright and MonetDB where I was not able to finish task with LucidDB, John Sichi contacted me with help to setup. You can see instruction how to load data on LucidDB Wiki page

You can find the description of benchmark in original post, there I will show number I have for LucidDB vs previous systems.


Load time
To load data into LucidDB in single thread, it took for me 15273 sec or 4.24h. In difference with other systems LucidDB support multi-threaded load, with concurrency 2 (as I have only 2 cores on that box), the load time is 9955 sec or 2.76h. For comparison
for InforBright load time is 2.45h and for MonetDB it is 2.6h

DataSize
Another interesting metric is datasize after load. In LucidDB db file after load takes 9.3GB.
UPDATE 27-Oct-2009 From metadata table the actual size of data is 4.5GB, the 9.3GB is size of physical file db.dat, which probably was not truncated after several loads of data.

For InfoBright it is 1.6GB, and for MonetDB – 65GB. Obviously LucidDB uses some compression, but it is not so aggressive as in InfoBright case. As original dataset is 55GB, compression rate for LucidDB is somewhat 1:12

Queries time

Let me put list of queries and times for all systems.

– Lame query “count start”
LucidDB:

1 row selected (55.165 seconds)

Both InfoBright and MonetDB returned result immediately.
It seems LucidDB has to scan whole table to get result.

– Q0:

LucidDB: 103.205 seconds
InfoBright: 4.19 sec
MonetDB: 29.9 sec

– Q1:
SELECT “DayOfWeek”, count(*) AS c FROM OTP.”ontime” WHERE “Year” BETWEEN 2000 AND 2008 GROUP BY “DayOfWeek” ORDER BY c DESC;
LucidDB: 49.17 seconds
InfoBright: 12.13 sec
MonetDB: 7.9 sec

– Q2:
SELECT “DayOfWeek”, count(*) AS c FROM otp.”ontime” WHERE “DepDelay”>10 AND “Year” BETWEEN 2000 AND 2008 GROUP BY “DayOfWeek” ORDER BY c DESC;
LucidDB: 27.131 seconds
InfoBright: 6.37 sec
MonetDB: 0.9 sec

– Q3:
!set rowlimit 10
SELECT “Origin”, count(*) AS c FROM otp.”ontime” WHERE “DepDelay”>10 AND “Year” BETWEEN 2000 AND 2008 GROUP BY “Origin” ORDER BY c DESC;
LucidDB: 27.664 seconds
InfoBright: 7.29 sec
MonetDB: 1.7 sec

– Q4:
SELECT “Carrier”, count(*) FROM otp.”ontime” WHERE “DepDelay”>10 AND “Year”=2007 GROUP BY “Carrier” ORDER BY 2 DESC;
LucidDB: 2.338 seconds
InfoBright: 0.99 sec
MonetDB: 0.27 sec

– Q5:
SELECT t.”Carrier”, c, c2, c*1000/c2 as c3 FROM (SELECT “Carrier”, count(*) AS c FROM OTP.”ontime” WHERE “DepDelay”>10 AND “Year”=2007 GROUP BY “Carrier”) t JOIN (SELECT “Carrier”, count(*) AS c2 FROM OTP.”ontime” WHERE “Year”=2007 GROUP BY “Carrier”) t2 ON (t.”Carrier”=t2.”Carrier”) ORDER BY c3 DESC;
LucidDB: 7.351 seconds
InfoBright: 2.92 sec
MonetDB: 0.5 sec

– Q6:
SELECT t.”Carrier”, c, c2, c*1000/c2 as c3 FROM (SELECT “Carrier”, count(*) AS c FROM OTP.”ontime” WHERE “DepDelay”>10 AND “Year” BETWEEN 2000 AND 2008 GROUP BY “Carrier”) t JOIN (SELECT “Carrier”, count(*) AS c2 FROM OTP.”ontime” WHERE “Year” BETWEEN 2000 AND 2008 GROUP BY “Carrier”) t2 ON (t.”Carrier”=t2.”Carrier”) ORDER BY c3 DESC;
LucidDB: 78.423 seconds
InfoBright: 21.83 sec
MonetDB: 12.5 sec

– Q7:
SELECT t.”Year”, c1/c2 FROM (select “Year”, count(*)*1000 as c1 from OTP.”ontime” WHERE “DepDelay”>10 GROUP BY “Year”) t JOIN (select “Year”, count(*) as c2 from OTP.”ontime” GROUP BY “Year”) t2 ON (t.”Year”=t2.”Year”);
LucidDB: 106.374 seconds
InfoBright: 8.59 sec
MonetDB: 27.9 sec

– Q8:
SELECT “DestCityName”, COUNT( DISTINCT “OriginCityName”) FROM “ontime” WHERE “Year” BETWEEN 2008 and 2008 GROUP BY “DestCityName” ORDER BY 2 DESC;

Years, LucidDB, InfoBright, MonetDB
1y, 6.76s, 1.74s, 0.55s
2y, 28.82s, 3.68s, 1.10s
3y, 35.37s, 5.44s, 1.69s
4y, 41.66s, 7.22s, 2.12s
10y, 72.67s, 17.42s, 29.14s

– Q9:
select “Year” ,count(*) as c1 from “ontime” group by “Year”;
LucidDB: 76.121 seconds
InfoBright: 0.31 sec
MonetDB: 6.3 sec

As you see LucidDB is not showing best results. However on good side about LucidDB I can mention it is very reach featured, with full support of DML statement. ETL features is also very impressive, you can extract, filter, transform external data (there is even access to MySQL via JDBC driver) just in SQL queries (compare with single LOAD DATA statement in InfoBright ICE edition). Also I am not so much in Java, but as I understood LucidDB can be easily integrated with Java applications, which is important if your development is Java based.

Worth to mention that in LucidDB single query execution takes 100% of user time in single CPU, which may signal that there some low-hanging fruits for optimization. OProfile can show clear places to fix.

20 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
John Sichi

Thanks Vadim, glad you got it successfully running with LucidDB.

In the comments on your earlier post, I noted that LucidDB is optimized for complex schema/query patterns, so we’re not surprised to see it burning CPU on these ones. But the ball is in our court now to provide some representative examples for another round of comparison.

Regarding tuning, there’s a well-known technique for pushing aggregations down into filtered column scans (since the compressed representation in each block already has the list of distinct values as well as a count for each, from which the filtering can decrement for each row), but it hasn’t been implemented yet for LucidDB. I think that will provide an order of magnitude improvement for this query pattern (i.e. it’s an entirely different algorithmic as opposed to CPU tuning).

Regarding compression, Nick got a number under 4GB for the stored database size, so there may be some discrepancy there (perhaps he used a different set of indexes).

Roland Bouman

Thanks Vadim!

Joseph.C

Much informative! I happened to look for some examples on database benchmarks among infobright, innodb etc. Thanks for the nice post!

Nicholas Goodman

Vadim,

Thanks for posting your results. I saw a similar profile of single CPU 100% when I was testing myself and agree there may be some “low hanging” fruit there for tuning. As a community driven open source project, we welcome any opportunity and help to improve any feature/performance results. As you noted in your blog, LucidDB is built for BI which means fast (er?) 🙂 but also includes the transparent data access(JDBC/custom), ability to do inline ELT, warehouse labels (for read consistent reporting while doing ETL).

re: Loading of data and size. I loaded years 1998 to 2008 since your queries where limited to that (although looking above it looks like the queries may have changed slightly). So, the 3GB I got was for the dataset we were querying on but it appears as if you loaded another 10 years? However, even there, I’d only expect to see the size up to 5-6GB.

Can you run / post the following storage report? This way we can see the size of the storage (idxes)
select table_schem as schema, table_name, index_name, pages*32/1024 as “SizeInMB” from sys_boot.jdbc_metadata.index_info_internal where table_schem = ‘OTP’ order by 1,2,4 desc;

Nicholas Goodman

Vadim,

LucidDB does not reclaim space from dropped objects until the ALTER SYSTEM DEALLOCATE OLD is run. Had this of been done between runs the db.dat would be close to the 4.5 you observed. Sometimes this is beneficial as part of a batch ETL process, but it would be nice if it were automatic (or configurable).

ken

Look forward seeing the new LucidDB release with better performance!

John Sichi

Vadim: for a more-up-to-date benchmark, see the Star Schema Benchmark. It’s a simplification of TPC-H which removes some of the joins in order to create a proper star. Still synthetic though.

http://www.cs.umb.edu/~poneil/StarSchemaB.PDF

Vadim

John,

Are there utils around Star Schema Benchmark ? I mean datagen or something ?

Otis Gospodnetic

Hm, LucidDB doesn’t look good in this benchmark. Was the test done with LucidDB 0.9.4 or some earlier version?

Otis Gospodnetic

You are right, 0.9.2 is the latest.
Are you planning on doing another test with LucidDB? I’d be interested in seeing the comparison of LucidDB, MonetDB, and InfiniDB (they just had a release).

Thanks.

Otis Gospodnetic

Thanks for the pointer, Vadim, I can’t wait to see the final results!
When doing these comparisons, are you getting experts from each project to tune/optimize their DB?

Otis Gospodnetic

Excellent!
This is good, because benchmarks done in a vacuum are often not realistic, unless the person preparing the benchmark is truly an expert in all tools being benchmarked, which is very rarely the case. I know I’ve seen such expert-advice/review-free benchmarks in search engine land (Lucene, Solr, Sphinx, Xapian…) and, as a Lucene/Solr guy, found them frustrating and worthless.

Is all the code/setup used for benchmarking going to be available, so individuals and other organizations can make use of it, possibly improving it, and even maintaining it, so that it is easy to re-run the benchmark with newer releases of the software?
Putting everything on Github, where it can be easily forked, may make sense here.

John Sichi

We’re very happy to have a well-respected independent organization like Percona running these. As one of the “experts” involved, one thing I can say is that it would be great if we could be given direct access to the box during the setup phase to help with tuning, and then release it to Vadim for exclusive access/auditing of the final runs. Doing everything by proxy adds enough overhead that it’s not always possible to try as many configurations as one would like. Working with big data sets increases the challenge due to the times involved (particularly for loading), so starting with a small validation set first can help a lot too before moving on to full scale. I realize there are other issues like security and multi-user contention on shared hardware that may not make direct access practical.

Otis Gospodnetic

What John wrote above makes sense: +1
Without that, the experts will always be a little handicapped and the benchmark quality will suffer.

Thank you for doing this valuable work!