3 Replies Latest reply on Mar 25, 2004 8:20 PM by mikefinn

    Help!  Too many Linux JBoss processes being created...

    trackingroi.com

      We've recently moved from Windows to Linux (Red Hat 9) with JBoss. We are currently experiencing a problem with the number of JBoss processes that are being created. We've reduced the number of threads to 5 as a test, but JBoss is still creating > 50 processes even without any clients connecting.

      How can we limit / fix the max number of processes that are spawned? I'm assuming that the output of ps -auxf is a list of processes not threads and that the linux processes are much heavier than a thread would be. I could be wrong :)

      Thank you so much for any guidance you can provide.

      Here is the jboss part of ps -auxf

      jboss 1174 0.0 1.1 2164 1108 pts/0 S 15:23 0:00 \_ -sh -c sh
      jboss 1198 0.0 1.0 2084 984 pts/0 S 15:23 0:00 \_ sh /u
      jboss 1203 0.0 63.2 262576 59124 pts/0 S 15:23 0:00 \_ /
      jboss 1204 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1205 0.3 63.2 262576 59124 pts/0 S 15:23 0:01
      jboss 1206 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1207 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1208 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1209 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1210 0.7 63.2 262576 59124 pts/0 S 15:23 0:02
      jboss 1211 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1212 6.5 63.2 262576 59124 pts/0 R 15:23 0:18
      jboss 1213 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1218 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1219 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1220 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1221 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1222 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1223 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1224 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1225 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1226 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1228 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1229 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1230 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1232 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1233 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1234 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1235 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1236 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1237 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1238 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1240 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1241 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1242 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1243 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1244 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1245 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1246 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1247 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1248 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1249 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1250 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1251 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1252 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1253 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1254 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1255 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1256 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1257 0.0 63.2 262576 59124 pts/0 S 15:23 0:00
      jboss 1258 0.0 63.2 262576 59124 pts/0 S 15:23 0:00

        • 1. Re: Help!  Too many Linux JBoss processes being created...
          clajoie

          JBoss isn't actually creating that many processes (and yes you're correct processes are much heavier wieght than threads). The ps command when using kernels prior to 2.6, and the 2.6 kernel when not using NPTL, shows every thread as a process. So what you're seeing is one JBoss process and a bunch of threads that it created. If you want to see something really scarey do an lsof on each "process" and it will appear that JBoss is holding open hundreds of file decriptors if not thousands. This too is untrue, instead each "process"/thread reports all the descriptors currently open by any jboss thread.

          If you are using kernel 2.6 with the new NPTL threading library you'd see what you'd expect to see. One JBoss process in the process list.

          So despite the fact that it looks really bad what you're seeing is actually just fine.

          • 2. Re: Help!  Too many Linux JBoss processes being created...
            trackingroi.com

            Thank you very much for your reply! It looks like we're up and running now, but have hit a new snag. I'll post it under a different topic - thank you again.

            • 3. Re: Help!  Too many Linux JBoss processes being created...
              mikefinn

              FWIW, NPTL is also in RH 9 (2.4.20 kernel). Of course, that only helps if you are a RH shop.

              mike