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


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

Re: Java daemon

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: Java daemon
Date Sun, 18 Nov 2012 14:02:29 -0800
Organization A noiseless patient Spider
Lines 24
Message-ID <k8blto$r2l$1@dont-email.me> (permalink)
References <k7r0dv$l3g$1@news.albasani.net> <k7r0su$s92$1@dont-email.me> <k7sq0e$poi$1@news.albasani.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Sun, 18 Nov 2012 22:02:32 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="27733"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+U4CS0O8QkmphUlIAT3FmR8jcW3ir6YOk="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
In-Reply-To <k7sq0e$poi$1@news.albasani.net>
Cancel-Lock sha1:xe+Q7MNuMjlQH0MxFpy09x03PUg=
Xref csiph.com comp.lang.java.programmer:19796

Show key headers only | View raw


On 11/12/2012 10:40 PM, SL wrote:

> I do have a question on GC: how to run the GC continuously ? Create a
> thread, do some memory juggling to induce the GC to run ?


I haven't been following closely, so I don't know what version of Java 
you're working with, but a web search for "java garbage collection 
tuning" usually gives lots of good hits.

<http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#available_collectors>

You probably want the parallel GC or the concurrent GC.  And no, you do 
not create a new thread or "juggle memory," you configure it externally 
to your application.

Also, take a look at the System.gc() call, but DON'T USE THAT unless 
you're sure you need it.  The garbage collector is probably smarter than 
you are about when and how to collect unused memory, frankly.

<http://stackoverflow.com/questions/2414105/why-is-it-a-bad-practice-to-call-system-gc>


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