Stardust/Knowledge Base/Performance Tuning/Increase cache size on sequences

From Eclipsepedia

Jump to: navigation, search


Contents

Introduction

There are three different approaches user would take to influence the sequence generation.


Default Sequence Generator

The Default Sequence Generator is the standard sequence generator used by IPP with a cache size of 100 sequences. This can be changed with below property.

Carnot.Engine.Tuning.SequenceBatchSize = 100

The sequence cache of the Default Sequence Generator is a cache per table and JVM. The cache can be increased but should not be increased too much, since gathering sequences is an expensive operation where the costs are driven by the size of the cache. So do not increase it over 500, unless it is necessarily

The benefit of the Default Sequence Generator is that user doesn’t have to change the sequence definition. Sequences would still be incremented by 1. Also the cache is JVM global, which means user would not lose sequences unless user doesn’t restart the server.

Fast Caching Sequence Generator

The Fast Caching Sequence Generator is mainly used for pure straight through processing. Hereby sequences are cached per table and thread. The gathering process is very efficient; however it would be required to change the sequence definition accordingly. If the batch size is 1000 the sequences need to be prepared to be incremented by 1000.

The drawback of the Fast Caching Sequence Generator is that user has to change the sequence definition and that user can lose many sequences in case of threads are released from thread pools or the server is restarted.

Custom Sequence Generator

It’s also possible to implement a custom sequence generation strategy which could be a mix of 'Default' and 'Fast Caching'. That way user can tailor the behavior more to the use cases.