# TP Core Usage

**URL:** <https://forum.kx.com/t/tp-core-usage/12275>\
**Category:** Community Support\
**Tags:** add-ons\
**Created:** [November 23, 2021, 2:45am UTC](https://forum.kx.com/t/tp-core-usage/12275 "2021-11-23T02:45:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leguan1](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@leguan1](https://forum.kx.com/u/leguan1)\
**Post date:** [November 23, 2021, 2:45am UTC](https://forum.kx.com/t/tp-core-usage/12275/1 "2021-11-23T02:45:00Z")

</div>

Hello Everyone,&nbsp;

I would like to ask how to make TP use all cores/taskSets to which the TP binds.&nbsp; I have a TP has 4 taskSets, but only one of the four is working at this moment, reaching to a very high cpu usage&nbsp; (99.8%) while the rest 3 are all in ideal(0.0%). This results to the TP fails consume all data in time from upstream data-feeder.&nbsp;But the way, the TP works in batching mode(pubs in every 100ms)&nbsp;with “multi-pub” set to false.

thank you all!

leguan,

---

<div class="post-metadata">

**Author:** ![rocuinneagain1](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@rocuinneagain1](https://forum.kx.com/u/rocuinneagain1)\
**Post date:** [November 23, 2021, 10:38am UTC](https://forum.kx.com/t/tp-core-usage/12275/2 "2021-11-23T10:38:00Z")

</div>

The traditional tick.q is a single threaded process but there are many areas you can investigate to ensure performance is at it’s best:

- Use taskset to ensure other processes are not using the same core/recourses as the TP&nbsp;
- As the TP persists data to a log file ensuring that you have evaluated your hardware configuration&nbsp;is important to validate that your storage disk is not bottlenecking your system
- Chained tickerplants&nbsp;can be used to balance the flow of data in a system, particularly when there are many subscribers
- Async broadcast&nbsp;can be used to optimise publishing the same data to multiple subscribers
- Ensure the system is setup to follow best practices outlined in Linux production notes
- Use&nbsp;Unix domain sockets&nbsp;when opening connections on localhost to reduce CPU usage
- Unix domain sockets are also available from C feedhandlers
- Whitepaper on Kdb+ tick profiling&nbsp;

KX Platform:

- Messaging&nbsp;performance tuning
- Tickerplant template
- Process instances core affinity

---

<div class="post-metadata">

**Author:** ![leguan1](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@leguan1](https://forum.kx.com/u/leguan1)\
**Post date:** [December 6, 2021, 7:51am UTC](https://forum.kx.com/t/tp-core-usage/12275/3 "2021-12-06T07:51:00Z")

</div>

Hello&nbsp;&nbsp;Ruiconneagain, thank you for detailed response!
