On Sat, 23 Apr 2011 23:19:53 -0400 Ken Wesson <kwess...@gmail.com> wrote:
> On Sat, Apr 23, 2011 at 8:13 PM, Mike Meyer <m...@mired.org> wrote: > > On Sat, 23 Apr 2011 19:41:28 -0400 > > Ken Wesson <kwess...@gmail.com> wrote: > > or you live in a universe where cosmic rays can flip bits and other > > sources of hardware hiccups exist. > Software crashes caused by non-software-bug-triggered memory > corruption seem to me to be exceedingly rare, and they could as easily > strike critical parts of the operating system as a multithreaded > server program (and a large batch of independent C jobs will occupy > more memory and have a correspondingly larger cross section as a > target for such things). > The best recourse if the server gets hit by something like that is > going to be to reboot it. While it might be exceedingly rare on a per-cpu-second basis, if your application runs 7x24 on enough cpus, you can expect to see them at regular intervals. In which case the best recourse - if you want a stable, robust application - is to restart the smallest set of processes that might have been affected by the problem. In some cases, that is the server. In others, it's a single process. In still others, it's the set of servers participating in a distributed application. > >> > starting a pool of processes to avoid the startup time of a new process > >> > when a new client connects. > >> > >> With small lightweight C processes and some suitable system for IPC, > >> this can work. With JVMs, not so much, unless you have RAM coming out > >> of your ears. JVM processes tend to be fairly large; it wouldn't take > >> many 64MB java.exe jobs to start the pagefile thrashing. Even with an > >> 8GB server, you start paging at 128 simultaneous connections in that > >> case, and you certainly can't handle thousands. > > > > I would have expected large chunks of the JVM processes to be shared > > between parent and child - especially before the first accept > > returns. > > That happens forking C programs. It won't happen starting up separate, > independent JVM processes, and I don't know how a JVM will handle it > if a native method calls fork() but I somehow doubt it will all just > work peachily. Ah, good point. I don't think in Java, so forget that it doesn't necessarily have access to all the facilities of the underlying OS. <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Software developer/SCM consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en