Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance: HSQLDB specifiс and common issues

 
Anatoliy Knyazev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm designing an application right now. It is a system used to collect statistics from 10-1000 agent PCs and provide some web-access to it. I've decided to use in-process HSQLDB as persistent storage.

What i see from some research:
1)Every agent will write some small amount of data (say, 256 bytes) to my server every 10 seconds via XML-RPC. The stat.server must be up and running 24x7 or almost so.
2) There will be a small web front-end to view/analyze statistics.

Current not-so-elaborate design:

One singleton DAO, that creates HSQLDB in-mem.
One read-only connection, and one normal connection, are always up. I'm using prepared statements, for sure.

So, my questions are:

1)Will HSQLDB handle the load ? 1000*256*6 = 1.5mb/min ? I suppose yes, but anyway Maybe you'll advise me to change DB right now, before implementation.
2)What are you suggestions on making writing to DB fast and. err, thread-safe ? How many connections should i pre-create, should i use connection pooling or 1 "always up" connection will be enough ?
3)Are there any optimizations in HSQLDB for read-only connections ?
4)How should I read data with minimal disturbance for writing statistics ?

Thank you for any replies, in advance!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess writing a simulation will be a lot of work and not answering all questions.
If you find answers to your questions elsewhere, I would be interested, to hear from them too.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probably better answered on the hsqldb forum

http://sourceforge.net/forum/forum.php?forum_id=73674
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anatoliy,
Welcome to JavaRanch!

Most of your questions are tuning things. You are going to need to experiment with this because tuning parameters are typically application specific.

In general, they key thing to watch is that your transactions are as small as possible. This reduces the locks/contentions that usually cause bottlenecks in database intensive applications.
 
Anatoliy Knyazev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've cross-posted the question to HSQLDB forum at sf.net and got a reply from FredT, HSQDB developer there.
http://sourceforge.net/forum/forum.php?thread_id=1199658&forum_id=73674
 
Anatoliy Knyazev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Anatoliy,
Welcome to JavaRanch!

Most of your questions are tuning things. You are going to need to experiment with this because tuning parameters are typically application specific.

In general, they key thing to watch is that your transactions are as small as possible. This reduces the locks/contentions that usually cause bottlenecks in database intensive applications.


Thank you for warm welcome )

HSQLDB has AUTOCOMMIT=TRUE by default, that is, all transactions are as small as possible already... Or am I mistaken ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anatoliy,
You are correct that the transactions are as small as possible.

I'm glad you got an answer to your question. Feel free to come back here if you have any JDBC questions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic