374 words

Performance tuning, best practices

#1
2016-11-15 08:07

we have a system where we serve from a host process around 200 clients connected via webSockets (Jetty). The core process is running on a dedicated Windows 2012 server with 16 GByte RAM and 8 processor cores. 

What is strange for us is that max 20% of the cpu resources are used and the IO subsystem is at maximum 30% of activity under heavy load but database queries are let's say not at the speed we would expect.

We have currently 20.000.000 objects in the database, our configuration settings are:


<!-- ObjectDB Configuration -->

<objectdb>

<general>
  <temp path="$temp" threshold="64mb" />
  <network inactivity-timeout="0" />
  <url-history size="50" user="true" password="true" />
  <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />
  <log-archive path="$objectdb/log/archive/" retain="90" />
  <logger name="*" level="info" />
</general>

<database>
  <size initial="256kb" resize="256kb" page="2kb" />
  <recovery enabled="true" sync="false" path="." max="128mb" />
  <recording enabled="false" sync="false" path="." mode="write" />
  <locking version-check="true" />
  <processing cache="2048mb" max-threads="48" />
        <index-update enabled="true" priority="40" />
  <query-cache results="1024mb" programs="500" />
  <extensions drop="temp,tmp" />
</database>

<entities>
  <enhancement agent="false" reflection="warning" />
  <cache ref="weak" level2="2048mb" />
        <fetch hollow="true" />
  <persist serialization="false" />
  <cascade-persist always="auto" on-persist="false" on-commit="true" />
  <dirty-tracking arrays="true" />
</entities>

<schema>
</schema>

<server>
  <connection port="6136" max="100" />
  <data path="$objectdb/db" />
        <embedded-server enabled="true" />
  <!--
  <replication url="objectdb://localhost/test.odb;user=admin;password=admin" />
  -->
</server>

<users>
  <user username="admin" password="admin">
   <dir path="/" permissions="access,modify,create,delete" />
  </user>
  <user username="$default" password="$$$###">
   <dir path="/$user/" permissions="access,modify,create,delete">
    <quota directories="5" files="20" disk-space="5mb" />
   </dir>
  </user>
  <user username="user1" password="user1" />
</users>

<ssl enabled="false">
  <server-keystore path="$objectdb/ssl/server-kstore" password="pwd" />
  <client-truststore path="$objectdb/ssl/client-tstore" password="pwd" />
</ssl>

</objectdb>

 

Now the question is:

- how can we tune for performance ?

- do we need more processors ?

- should we change some settings in the configuration ?

- other hints or proposals 

hgzwicker
hgzwicker's picture
Joined on 2014-04-09
User Post #23
#2
2016-11-16 13:39

The configuration looks fine. The system serve 200 clients, but is it possible that the specific slow operation (possibly a complex query) is slow also for a single user? i.e. can you check if the performance issue is due to load of several concurrent clients, or maybe same slow performance is also for a single user with that specific operation?

ObjectDB can use multiple cores to serve concurrent requests from different users, and also tries to use multiple cores for a single request, but the later is usually more complex and sometimes limited.

If you find that a particular query is slow - the best way to improve performance is to explore that query, rephrase it if possible and/or define additional indexes.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,642

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel