Forum Stats

  • 3,853,749 Users
  • 2,264,264 Discussions


Selecting an extent size for Queues

530582 Member Posts: 3
edited Aug 29, 2006 7:54AM in Berkeley DB

Has anyone got experience in selecting an extent size for BDB Queue toplogy databases? I'm trying to pick an extent size for a database and have come to the conclusion that throughput of data through the queue is a good guide when selecting an extent size. I.e. make your extent size proportional to the amount of data which moved through the queue. For example: Assuming you're not too worried about disc space, for a queue with 50MB of data throughput pick an extent size of 10MB.

Has anyone got any ideas whether this approach is sound?

The technical reference makes the following statement, which although accurate isn't very helpful:

In choosing an extent size there is a tradeoff between the amount of disk space used and the overhead of creating and deleting files. If the extent size is too small, the system will pay a performance penalty, creating and deleting files frequently. In addition, if the active part of the queue spans many files, all those files will need to be open at the same time, consuming system and process file resources.

Regards, Sebastian.


  • Hi Sebastian,

    If you are not too worried about the disc space, you don't specify any extent size at all and the Queue will reside in a single file, without releasing any disk space.

    You belive that a report of 5:1 will be good engough for those who want not to stress the system too much, by deleting/creating files to often? Or that a proportion should exist between the throughput and the extent size? And if yes, what's the logic behind this assumption?

    I'm not sure that there is a universal prescription for extent size, because the extent size might depend on the database size, record size or even on the file system type.
    Can you please provide those details regarding your environment, and what differences did you see by choosing different extent sizes? Maybe someone experimented and discovered the same approach.

    This is why you think that the technical reference isn't very helpful, because there is no universal solution in this case... and also it's not easy to divide only in 2-3 subcases.

    Bogdan Coman
This discussion has been closed.