mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
Add ability to override the service pool size [DPP-1306] (#15653)
* Add ability to override the service pool size * don't set the value in the reference.conf
This commit is contained in:
parent
9cee266479
commit
9a12bb8b67
@ -25,10 +25,12 @@ final case class ParticipantConfig(
|
||||
indexService: IndexServiceConfig = IndexServiceConfig(),
|
||||
indexer: IndexerConfig = IndexerConfig(),
|
||||
participantIdOverride: Option[Ref.ParticipantId] = None,
|
||||
servicesThreadPoolSize: Int = ParticipantConfig.DefaultServicesThreadPoolSize,
|
||||
)
|
||||
|
||||
object ParticipantConfig {
|
||||
def defaultIndexJdbcUrl(participantId: Ref.ParticipantId): String =
|
||||
s"jdbc:h2:mem:$participantId;db_close_delay=-1;db_close_on_exit=false"
|
||||
val DefaultParticipantId: Ref.ParticipantId = Ref.ParticipantId.assertFromString("default")
|
||||
val DefaultServicesThreadPoolSize: Int = Runtime.getRuntime.availableProcessors()
|
||||
}
|
||||
|
@ -572,6 +572,9 @@ ledger {
|
||||
# The size of the submission batch within parallel ingestion pipeline.
|
||||
submission-batch-size = 50
|
||||
}
|
||||
# The size of the thread pool underpinning internal services. Used for both the ledger api as well as
|
||||
# the read and write services. When not set, the number of processors is used instead
|
||||
# services-thread-pool-size = 50
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ object SandboxOnXRunner {
|
||||
timeServiceBackendO = configAdaptor.timeServiceBackend(participantConfig.apiServer)
|
||||
(stateUpdatesFeedSink, stateUpdatesSource) <- AkkaSubmissionsBridge()
|
||||
|
||||
servicesThreadPoolSize = Runtime.getRuntime.availableProcessors()
|
||||
servicesThreadPoolSize = participantConfig.servicesThreadPoolSize
|
||||
servicesExecutionContext <- buildServicesExecutionContext(metrics, servicesThreadPoolSize)
|
||||
|
||||
buildWriteServiceLambda = buildWriteService(
|
||||
|
Loading…
Reference in New Issue
Block a user