Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9168903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:44:34+00:00 2026-06-17T15:44:34+00:00

From official BoneCP doc: http://jolbox.com/index.html?page=http://jolbox.com/configuration.html partitionCount In order to reduce lock contention and thus

  • 0

From official BoneCP doc: http://jolbox.com/index.html?page=http://jolbox.com/configuration.html

partitionCount In order to reduce lock contention and thus improve performance, each incoming connection request picks off a connection
from a pool that has thread-affinity, i.e. pool[threadId %
partition_count]. The higher this number, the better your performance
will be for the case when you have plenty of short-lived threads.
Beyond a certain threshold, maintenence of these pools will start to
have a negative effect on performance (and only for the case when
connections on a partition start running out).

Default: 2, minimum: 1, recommended: 3-4 (but very app specific)

But it is not so clear and does not have a good example. I am running a normal web service, with 0-500 simultaneous thread. Which is a good value and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:44:35+00:00Added an answer on June 17, 2026 at 3:44 pm

    So internally BoneCP has the partition count number of pools of connections. Each time a thread tries to work with a connection, it takes thread.getId() % partitionCount and works with a connection from that pool. And you will have maxConnectionsPerPartition * partitionCount number of connections in total.

    Why this has a positive effect on performance? Well to not have two threads use on the same connection simultaneously (obviously this would be bad), BoneCP has to take a lock to release or acquire the connection. But in the same time all the other threads that want to do the same, have to wait on that lock. So in a sense you can release or acquire partitionCount number of connections in parallel.

    What number to set it to? I think # of cores is a good start, as you wouldn’t have more work happening in parallel anyways. But other than that try to predict how many threads would be racing for connections, measure and repeat.

    BTW, most of the world has been relying on c3po for over a decade and that essentially had partition count set to 1. So you can’t go very wrong with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I copied exactly the same code from official example http://twitter.github.com/bootstrap/examples/starter-template.html . But on my
the following lines are from the official jQuery website <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script> <script>!window.jQuery && document.write('<script
I really like the diagrams and flowcharts from the official developer.android.com website and I
from the official RestKit page Restkit Github I found the following to reset the
I am trying to install rvm from the official install page. Running this is
This snippet from official website works as expected: $treeObject = Doctrine::getTable('Category')->getTree(); $rootColumnName = $treeObject->getAttribute('rootColumnName');
Aside from the official GWT blog, which GWT blogs do you read?
Quote from hib official docs: Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method.
Starting from this official statement that all xyAndroid versions previous API 11 doesn't support
I download cakephp 2.1 from the official website. When I copied files to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.