High number of "MSC service thread" in JBoss 6.1 EAP

Latest response

Hi,

I have a vanilla jboss eap 6.1 but starting it up, I get 256 "MSC service thread" fired up. starting from 1-1 to 1-256.
I have a limited resource and want to minimise thread count per JVM.

What's the reason for so many threads? what do they do? Is it safe to reduce the number? If positive, how can I do that?

Regards,
Amin

Responses

Had a look at jboss-msc code.
Apparently the number of maximumPoolSize by default is calculated from number of CPU ?!!

    public static ServiceContainer create() {
        int cpuCount = Runtime.getRuntime().availableProcessors();
        int coreSize = Math.max(cpuCount << 1, 2);
        return new ServiceContainerImpl(null, coreSize, 30L, TimeUnit.SECONDS, true);
    }

The comment from 19 March 2014 only answers the first question.

What about the other questions? (what do they do? Is it safe to reduce the number? If positive, how can I do that?)

Can anybody help?