Jim ([EMAIL PROTECTED]) wrote:

> Anyway, I downloaded the latest build and run the start-freenet script.  
> Freenet went crazy and spawned many java processes and maxed out the cpu 
> usage.  Is this a common problem or should I investigate further.

That's pretty normal.  When you first start a new Freenet node, it
has to initialize the data store, which is a CPU- and I/O-intensive
operation.  (It creates a one or more huge files on the disk, their
size being dependent on the values you filled in during configuration.)

After that, the many threads will remain (Freenet is inherently a
multithreaded Java beast), but CPU usage should drop for a little
while, if you have a sufficiently modern computer.

After *that*, if you're running a non-transient node that's pretty
well connected, your CPU usage and disk I/O may shoot back up when
other nodes start making lots of requests aimed at/through your
node.  If this interferes with other processes running on your
machine, you can throttle it down a bit by adjusting the maximumThreads
parameter:

  # Should we use thread management?  If this number is defined and non-zero,
  # this specifies the max number of threads in the pool.  If this is overrun
  # connections will be rejected and events won't execute on time.
  maximumThreads=120

Depending on your computer, you might want to lower that to 90, 60, or
whatever seems comfortable.

If you aren't already doing so, I'd suggest running Freenet as its
own user (I cleverly named mine "freenet").  This lets you stop the
node simply by executing "killall java" as that user.  Also, if
you're using per-user process limits, then the huge number of
threads/processes that Freenet creates won't affect your normal
user's limits.  Finally, it also insulates Freenet from the rest
of your system a little bit, just in case someone finds an exploitable
bug in it.  (I've not heard of any such bugs yet, but paranoia is
healthy.)

-- 
Greg Wooledge                  |   "Truth belongs to everybody."
[EMAIL PROTECTED]              |    - The Red Hot Chili Peppers
http://wooledge.org/~greg/     |

Attachment: msg00838/pgp00000.pgp
Description: PGP signature

Reply via email to