Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19737

Re: Java daemon

From Arved Sandstrom <asandstrom2@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: Java daemon
References <k7r0dv$l3g$1@news.albasani.net> <k7r0su$s92$1@dont-email.me> <k7sq0e$poi$1@news.albasani.net>
Message-ID <lppos.2575$9F5.464@newsfe21.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2012-11-13 06:37 -0400

Show all headers | View raw


On 11/13/2012 02:40 AM, SL wrote:
> David Lamb wrote:
>> On 12/11/2012 9:17 AM, sl@exabyte wrote:
>>> Since java also adopts the garbage collector mechanism, would java
>>> daemon suffers from the same memory problem ?
>>
>> There are several different ways to do garbage collection, so flaws in
>> one implementation have no bearing on what goes on with another.
>>
>> The most common complaint that crosses implementations is the
>> unpredictability of when a gc happens, which can be a problem for a
>> program with serious real-time constraints. IIRC Java implementations
>> often have the gc run continuously and incrementally in a separate
>> thread, which evens out the effect.
>
> I did some google'ing on garbage collector (GC) in java and found that it is
> a big and complicated topic.
> Java programmer has no permission to invoke it directly, beside juggling its
> settings to adjust its frequency of running and the type of collector to
> run. Even then how the GC is invoked stilll lies beyond programmer's
> control.
>
> It gets me thinking.
>
> Why bother with it (people in the finance trade especially) ? Are the
> advantages so great over c/c++ ? If the answer is yes, I can only think that
> the reason is portability. Otherwise forget about tweaking GC; go for C/C++;
> programmer has full control over memory management, and it is faster than
> java.
>
> I hope my opinion does not ignite the ire of java people.
[ SNIP ]

No ire on my part. I back up what Peter said (particularly with respect 
to maintenance and reliability), and I'll add a few remarks of my own.

Think about why you'd want to invoke the Java GC yourself, and what that 
would entail. You'd want to know *when* to do it - if you wrote the code 
yourself to make that decision, and you were really good and really 
experienced, it would probably look a lot like _existing_ code for some 
GC or another. If you weren't that good then your code just wouldn't cut it.

By "code" I mean both the actual source and the GC parameters that you 
can tune.

At first glance it might seem like this indirection - setting parameters 
- removes a lot of control. That's not the case.

I'm not saying this is you - you already said it's not - but people who 
assert that they can do better decision-making as to when to invoke a GC 
run than the code that represents years of experience of GC specialists 
strike me in the same vein as people who assert they can get better gas 
mileage using manual stick than people who drive modern automatic 
transmission cars. A very few people *can* do that - the majority (huge 
majority) can't.

AHS

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Java daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-11-12 22:17 +0800
  Re: Java daemon David Lamb <dalamb@cs.queensu.ca> - 2012-11-12 09:25 -0500
    Re: Java daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-11-12 23:55 +0800
      Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-12 22:07 +0000
        Re: Java daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-11-13 10:56 +0800
          Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-12 22:08 -0500
          Re: Java daemon "SL" <sb5309@hotmail.com> - 2012-11-13 13:59 +0800
          Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-13 21:50 +0000
            Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 16:43 -0500
              Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-19 01:05 +0000
                Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 20:41 -0500
                Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-20 00:32 +0000
                Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-19 20:07 -0500
                Re: Java daemon Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-11-19 20:38 -0400
                Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-19 20:22 -0500
                Re: Java daemon Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-11-20 17:46 -0400
              Re: Java daemon Lew <lewbloch@gmail.com> - 2012-11-18 20:10 -0800
                Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-19 10:50 -0500
        Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-12 22:06 -0500
          Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-13 21:36 +0000
            Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-13 17:31 -0500
              Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-14 21:33 +0000
                Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-14 16:55 -0500
                Re: Java daemon Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-15 02:09 +0000
    Re: Java daemon "SL" <sb5309@hotmail.com> - 2012-11-13 14:40 +0800
      Re: Java daemon Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-11-12 23:39 -0800
        Re: Java daemon "SL" <sb5309@hotmail.com> - 2012-11-13 16:16 +0800
      Re: Java daemon Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-11-13 06:37 -0400
      Re: Java daemon David Lamb <dalamb@cs.queensu.ca> - 2012-11-13 08:46 -0500
      Re: Java daemon "John B. Matthews" <nospam@nospam.invalid> - 2012-11-13 21:23 -0500
      Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 16:52 -0500
      Re: Java daemon markspace <-@.> - 2012-11-18 14:02 -0800
        Re: Java daemon jlp <jlp@jlp.com> - 2012-11-19 20:39 +0100
          Re: Java daemon "SL@maxis" <ecp_gen@my-rialto.com> - 2012-11-20 15:23 +0800
  Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-12 09:41 -0500
  Re: Java daemon Jim Janney <jjanney@shell.xmission.com> - 2012-11-12 14:24 -0700
    Re: Java daemon Lew <lewbloch@gmail.com> - 2012-11-12 13:35 -0800
      Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-12 22:05 -0500
    Re: Java daemon Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 16:40 -0500

csiph-web