# Number of Threads to Number of Partition relation in Queue Processor

**URL:** <https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744>\
**Category:** General\
**Tags:** performance, system-administration, 8-8-3, case-management, lead-system-architect\
**Created:** [January 8, 2024, 2:08pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744 "2024-01-08T14:08:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarthickRajasingh](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@KarthickRajasingh](https://forums.pega.com/u/KarthickRajasingh)\
**Post date:** [January 8, 2024, 2:08pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/1 "2024-01-08T14:08:38Z")

</div>

The default number of partitions after 8.7 for a queue process is 6. We can increase it using pyalterstreampartitions activity.

The question we have is, is there a 1:1 relation between the maximum of threads which can be spawned across cluster to the number of partitions?

Example: If i increase the number of partitions to 40, can i increase the number of threads across cluster for a Queue processor to 40? or the maximum threads allowed is always 20 for a queue processor?

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/23377_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [January 8, 2024, 2:50pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/2 "2024-01-08T14:50:48Z")

</div>

@KarthickRajasingh

I believe it supports only up to 20 threads per cluster.

---

<div class="post-metadata">

**Author:** ![KarthickRajasingh](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@KarthickRajasingh](https://forums.pega.com/u/KarthickRajasingh)\
**Post date:** [January 8, 2024, 4:36pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/3 "2024-01-08T16:36:19Z")

</div>

@sangr2 Can you confirm on it? I didn’t find any clear documentation on it. If you can provide any supporting documentation it will be of great help.

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [January 8, 2024, 6:39pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/4 "2024-01-08T18:39:02Z")

</div>

@KarthickRajasingh in the older versions it was 20 partitions. Now in recent versions pega supports 6 partitions in a cluster. Please check 6th question in the below url.

[https://docs.pega.com/bundle/platform/page/platform/background-processing/queue-processor-faq.html](https://docs.pega.com/bundle/platform/page/platform/background-processing/queue-processor-faq.html)

---

<div class="post-metadata">

**Author:** ![Bhumireddy](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/bhumireddy/32/23248_2.png) [@Bhumireddy](https://forums.pega.com/u/Bhumireddy)\
**Post date:** [January 9, 2024, 3:14am UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/5 "2024-01-09T03:14:01Z")

</div>

Hi @KarthickRajasingh,

Could you please check the below articles? Very useful documents are related to Kafka and queue process documents

**Note** : My understanding is that from Pega Platform 8.7 onwards, it will create only 6 participations by default in 8.7 and before 8.7 versions it will create 20 participations by default.

If you want to increase or decrease the number of participants, you can run the below activity.

**Activity Name: pxAlterStreamPartitions (This activity available in Pega 8.7 and above versions)**

**Parameters:**

**stream: Pass in Your QP name All in Capital Letters**

**partitions: Number of partitions, I have tested it, I gave the value 25 , It is allowed and Created the 25 partitions in Personal Edition 8.7**

 ![QP.jpg](https://pega1.discourse-cdn.com/pega/original/3X/d/f/df7e0f6bac89c4b50e3a43a9468265454f08da22.jpeg)

**As above mentioned the Tool tip message, It is Same for the all versions, 8.6 and 8.7, The Value should be dynamic for every QP. Even The default value 6 partitions in the 8.7 Pega Platform, Still Tool tip message not updated and It is showing the 20.**

> **[Queue Processor - its Configuration, Usage & Execution](https://onestoppega.com/background-processing/queue-processor-in-pega/)**
>
> Queue processor in Pega is an internal background process operating on the server/node that runs business logic based on the specific time interval.

> **[Batch Data flow & Real-time Data flow in Pega](https://onestoppega.com/batch-processing/batch-data-flow-real-time-data-flow-in-pega/)**
>
> Data flow is the most efficient way of manipulating data when it comes to large sets of data. It plays a key role in the performance of our system

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.html)**

**Thanks,**

**Ashok**

---

<div class="post-metadata">

**Author:** ![Bhumireddy](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/bhumireddy/32/23248_2.png) [@Bhumireddy](https://forums.pega.com/u/Bhumireddy)\
**Post date:** [January 20, 2024, 1:52am UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/6 "2024-01-20T01:52:23Z")

</div>

Hi @KarthickRajasingh,

In my scanario, the maximum number of threads is 25, as I have increased the number of threads from 6 to 25. Still, if you want an increase, you can increase threads.

FYI, I have again increased 100 Threads,

PFA

 ![QPDetails.jpg](https://pega1.discourse-cdn.com/pega/original/2X/f/f9a0e37044199fd019974dca0ddbc787466fe5ff.jpeg)

Thanks,

Ashok

---

<div class="post-metadata">

**Author:** ![P.Siva.Praveen](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/p.siva.praveen/32/22985_2.png) [@P.Siva.Praveen](https://forums.pega.com/u/P.Siva.Praveen)\
**Post date:** [January 20, 2024, 2:55am UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/7 "2024-01-20T02:55:39Z")

</div>

@KarthickRajasingh

To test this try to execute this qp which would get execute all the requestors at once. I believe this might create the 40 threads (requestors). But the disadvantage of having the threads (requestors) it might eat up the resources.

To check the threads, open the dataflow associated with the QP and check how it behaves.

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [January 20, 2024, 6:40am UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/8 "2024-01-20T06:40:07Z")

</div>

@KarthickRajasingh

Maximum number of threads across all nodes in a cluster for a QP is 20. That’s the limit for a QP. Please check 8th point in the below url.

[https://docs-previous.pega.com/system-administration/87/queue-p](https://docs-previous.pega.com/system-administration/87/queue-processor-faq)

And if you increase beyond 20, only 20 will process messages from a QP. And the threads should be increased on the CPU and heap. We need to ensure if Host server can handle the load before increasing the threads to 20. But maximum number of threads limit is 20 for a QP.

[https://support.pega.com/question/increasing-thread-count-stream-node-and-custom-node](https://support.pega.com/question/increasing-thread-count-stream-node-and-custom-node)

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/23377_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [January 8, 2024, 4:44pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/9 "2024-01-08T16:44:37Z")

</div>

@KarthickRajasingh

Please find the links,

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.htmldecision-management/87/best-practices-stream-service-configuration)**

[Pegasystems Documentation](https://docs-previous.pega.com/system-administration/87/queue-processor-rules#:~:text=Each%20queue%20processor%20can%20process,threads%20simultaneously%20with%20no%20conflict).

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.htmldecision-management/87/sizing-queue-processors-and-stream-data-sets-individually-changing-number-partitions-topic)**

I hope this helps!

---

<div class="post-metadata">

**Author:** ![KarthickRajasingh](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@KarthickRajasingh](https://forums.pega.com/u/KarthickRajasingh)\
**Post date:** [January 19, 2024, 7:42pm UTC](https://forums.pega.com/t/number-of-threads-to-number-of-partition-relation-in-queue-processor/5744/10 "2024-01-19T19:42:28Z")

</div>

@Bhumireddy I completely understand and we did test from our end to make modifications on number of partitions but my question is related to number of threads. As explained by you, you can have 25 partitions but what is the maximum number of threads? is it 25 or 20 is the max?
