Projects tigase _server server-core Issues #202
Replace usage of Timer with ScheduledExecutorService where apropriate (#202)
Closed
Andrzej Wójcik (Tigase) opened 1 decade ago

Timer class uses only one thread to process all queued timer task, which may be bottleneck in some cases.

Replacing Timer class with implementation of ScheduledExecutorService will allow to associate more than one thread to process TimerTasks.

Andrzej Wójcik (Tigase) commented 1 decade ago

Added new key properties:

  • For any AbstractMessageReceiver based component SCHEDULER_THREADS_PROP_KEY (scheduler-threads) is used to set number of treads used by internal component timer.

  • For S2S component CID_CONNECTIONS_TASKS_THREADS_KEY (cid-connections-tasks-threads) is used to set number of threads used by timer used in CIDConnections class.

Added new method schedulerThreads() to class AbstractMessageReceiver which should return default number of threads to use for internal component timer. This method should be overridden in component which is known to need other number of threads than default.

Andrzej Wójcik (Tigase) commented 1 decade ago

Still we need to estimate proper values for variables methods marked by comment containing #1195

Andrzej Wójcik (Tigase) commented 1 decade ago

For now only default values for S2S component are changed to match number of CPUs.

For other components default value is 1 for now. - Propably is should also be increased for BOSH component.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
1195
Version
tigase-server-5.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#202
Please wait...
Page is in error, reload to recover