Slashdot Mirror


Reliable Java Threading w/ Linux 2.4?

mikej asks: "I'm involved in an ongoing saga that attempts to get an application running a large number of Java threads (30-60 sustained, 300+ peak) reliably. My last large hurtle was the context switching delay on the 2.2 kernel, which the 2.4 series has _nicely_ fixed. Now I'm running into problems keeping the JVM alive under threadload. The Sun and IBM java mailing lists and newsgroups are full of complaints concerning threading problems on Linux, and I'm faced with the choice of moving the system to Solaris (something that I very much do not want to do). Has anyone seen a system like this in action, and is there an especially successful combination of SDK/glibc/kernel?"

2 of 15 comments (clear)

  1. Re:We gave up... by ndfa · · Score: 3

    A very very sound idea!

    BUT to add to this Sun has done a lot with the new HotSpot server and threading with it is a lot better! With the Blackdown JVM i would consistently have a server (running maybe 15 threads) take down the JVM almost constantly if 'sunwjit' was used! I have seen this problem a lot less with the hotspot server which i am currently running on a slackware 7 system with linux 2.4.0!
    One idea might be to setup Solaris 8 on an intel box, or get a Ultra 10 (they are pretty cheap) and see how things work there!
    Also, there are many ways you could shoot yourself in the foot with that many threads ? Could GC be a problem ? Are you reusing the threads correctly ? Lots of stuff to think off that could cause problem! You might want to look at "Taming Java Threads" by Allen Holub... good read and could help you!
    just my $0.02

    --
    Non-Deterministic Finite Automata
  2. Sorry, but by SuiteSisterMary · · Score: 2
    The Sun and IBM java mailing lists and newsgroups are full of complaints concerning threading problems on Linux, and I'm faced with the choice of moving the system to Solaris (something that I very much do not want to do).
    Sorry, and I don't mean to be harsh, but that's just ignorant. If you're using Linux for Linux's sake, then shut up and live with the inherent problems. Linux simply nowhere near ready for the enterprise. No, let me back up. The Linux kernel isn't too bad; GNU/Linux the system is. Too many 0.x released bits, written by college fanboys in their spare time, with an 'if it compiles, it's done' mentality. This is bad. Also, the entire 'incremental updates' idea behind Linux as it stands is anathema to proper methodology; 'if it doesn't work,' they cry, 'patch the code!' 'Yes,' you say, 'that's fine, except that all code changes need to go through substantial regression testing, and besides, it should work in the first place.' I personally lost all respect for Linux on the server when the cron daemon that shipped (and enabled by default) on Mandrake 7.x would run jobs scheduled for 4 AM at 10 AM. Or 4 PM. Or whenever it felt like it. Guess what; if system A can't do what you need it to, but system B can, but you don't want to switch to B for undisclosed reasons, you have no business complaining about A's problems. And as an aside, you need to get somebody in charge to yell at the programmers. The problem with Java is that it promotes sloppy coding, because people brought up in Java tend to assume that the language will correct all problems. And they don't understand concepts like proper memory management. Feel free to get in touch if you want some more conversation on the joys of Linux vs quite a few other platforms in real deployment.
    --
    Vintage computer games and RPG books available. Email me if you're interested.