title: Java 8 GC threading on Solaris 9, multi-JVM environment, need to determine boundary for threads
body: <p>We are migrating from Weblogic 9 to Weblogic 12c.
  Plan is to move the JVMs to a "concurrent" design, instead of a VM for each JVM, the vendor-reccomended standard for our JBoss servers.
  So, we'll be using Sunfires or some such, 16 cores (8 physical, with hyperthreading or equivalent.) Memory isn't the issue. Issues are responsiveness, and threads used in GC.</p>
  
  <p>Using flags like "-XX:ConcGCThreads=" and "-XX:ParallelGCThreads=" seems best method to allow this Solaris Local Zone we've carved out of the Global Zone to limit the threads to something practical. 
  But we'll have multiple JVMs in the Local Zone - up to possibly 40. This must be completed by August, no one has started yet - you can see what's going to happen.</p>
  
  <p>Question: 
  In a system as decribed of N processors, with X JVMs concurrent, how do I determine an algorithm to pin the GC thread counts for CMS GC? (We're leaving G1GC and Throughput to manage themselves at this time, but the answer here might change that, too.)</p>
  
  <p>I've read this thread, no good answer. N+1 seems risky with that number of JVMs competing for resources. (and that's from 2010)
  <a href="https://stackoverflow.com/questions/3149081/what-is-a-good-ratio-of-java-threads-to-cpus-on-solaris">What is a good ratio of Java threads to CPUs on Solaris?</a></p>
  
  <p>Does the JVM see the Local Zone allocation of CPUs? 
  Does the JVM see instead ALL CPUs of the global zone?
  If we have N=16, say, should I limit the allocation artificially, setting our threads to N/2 or something? 
  Because a test program I grabbed indicated that for the 2 GB heap it was given on a Solaris box, it spawned 85 GC threads. It makes no sense, unless it spawned and terminated threads for each GC and that was just a total...  That was a lower-end machine from the new ones, but ... 85 threads? </p>
  
  <p>I'm planning a parallel-JVM test on that machine for tomorrow, hoping I can get some help here. The SME onsite told us to test every application... Which will occur in isolation, and then they'll be "married" in the local zone, and I fear disaster in PROD.</p>