You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Peter Schmitt <pe...@gmail.com> on 2016/09/09 14:06:34 UTC

Ignite Thread count

Hello Ignite-Community!

as some of you might have read, I'm using Ignite as local Off-heap caches
only.
I limited the discovery to localhost and therefore I don't need threads
which are just active to handle e.g. grid topics.

I would like to reduce the amount of threads to an minimum.
The Off-heap cache-access (read/write) should be fast, but everything else
isn't needed.
It might not matter a lot in an average case to have some additional
threads, however, the server as well as the cache are under heavy load and
therefore every useless context-switch should be avoided.

I'm currently experimenting with the following config:

IgniteConfiguration configuration = new IgniteConfiguration()
        .setDiscoverySpi(localNodeDiscovery) //limit to localhost
        .setDaemon(false);

TcpCommunicationSpi communicationSpi = new TcpCommunicationSpi();
communicationSpi.setSelectorsCount(1);
configuration.setCommunicationSpi(communicationSpi);

ConnectorConfiguration connectorConfiguration = new
ConnectorConfiguration();
connectorConfiguration.setSelectorCount(1);
configuration.setConnectorConfiguration(connectorConfiguration);

configuration.setClockSyncFrequency(Integer.MAX_VALUE);
configuration.setUtilityCachePoolSize(1);
configuration.setManagementThreadPoolSize(1);
configuration.setPublicThreadPoolSize(1);
configuration.setRebalanceThreadPoolSize(1);
configuration.setSystemThreadPoolSize(4);


and CacheConfiguration.setEagerTtl(false) for caches which don't need a TTL
for its entries.

1)
Do you see any issue with this config that impacts the described use-case?


2)
Are there other threads I can get rid of as well?
(currently there are still ~20 threads from Ignite on an average
developer-machine.)
I'm e.g. wondering about
 a) disco-event-worker
 b) exchange-worker
 c) grid-time-coordinator
 d) grid-time-server-reader
 e) ignite-clock
 f) nio-acceptor
 g) pub-*
 h) session-timeout-worker
 i) tcp-disco-msg-worker
 j) tcp-disco-srvr

Any hint is appreciated,
Peter

Re: Ignite Thread count

Posted by vkulichenko <va...@gmail.com>.
Hi Peter,

I don't really know your use case :) From my experience, default Ignite
settings with combination of JVM setting provided in docs give the best
performance for most use cases. However, you're changing these settings for
a different reason and don't know how it will influence the results. There
is a big chance that reducing number of threads (especially for system poll)
will make performance worse, so it's a tradeoff.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Thread-count-tp7636p7691.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Ignite Thread count

Posted by Peter Schmitt <pe...@gmail.com>.
Hi Val,

any information which helps to improve the performance for that use-case.

Kind regards,
Peter



2016-09-10 1:09 GMT+02:00 vkulichenko <va...@gmail.com>:

> Peter,
>
> What kind of information you're looking for?
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Ignite-Thread-count-tp7636p7644.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Ignite Thread count

Posted by vkulichenko <va...@gmail.com>.
Peter,

What kind of information you're looking for?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Thread-count-tp7636p7644.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Ignite Thread count

Posted by Peter Schmitt <pe...@gmail.com>.
Hi Val,

thank you for your hint!
I just found out that reducing public-thread-pool-size results in a lower
write-performance.
At least I could reproduce it.

Are there any other information out there besides
https://apacheignite.readme.io/docs/performance-tips ?

Kind regards,
Peter



2016-09-09 23:53 GMT+02:00 vkulichenko <va...@gmail.com>:

> Hi Peter,
>
> You can probably set connectorConfiguration to null to disable the REST
> server at all (unless you need it, of course). Other than that, you used
> all
> the settings that can influence the number of threads. Ignite is designed
> to
> be a distributed system, so it doesn't allow to disable discovery,
> communication or other crucial components.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.705
> 18.x6.nabble.com/Ignite-Thread-count-tp7636p7638.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Ignite Thread count

Posted by vkulichenko <va...@gmail.com>.
Hi Peter,

You can probably set connectorConfiguration to null to disable the REST
server at all (unless you need it, of course). Other than that, you used all
the settings that can influence the number of threads. Ignite is designed to
be a distributed system, so it doesn't allow to disable discovery,
communication or other crucial components.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Thread-count-tp7636p7638.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.