Unstable build 6044 is now available from CVS. The unstable snapshot has also been updated. This is the result of several weeks work by me and zab, and considerable work by zab prior to the recent rapid progress, on implementing java.nio. It is a major change that affects most areas of Fred, although it is not complete, there are many areas that could reasonably be described as kludges and probably many unresolved bugs. We do however need wider testing.
Current status:
* One thread listens for all interfaces and accepts connections
for FCP, FNP, Mainport and the Distribution Servlet - the
ListenSelectorLoop.
* We have a single network write thread and a single network read
thread, the Read/WriteSelectorLoop classes. Bandwidth limiting
is implemented at this level, but shared/overall limits are no
longer possible. We could implement them if absolutely
necessary, but we omitted them because it would be considerable
effort. There may well be bugs in this code.
* Pseudo-blocking streams (implemented using the selector loops
and some locking) are provided for parts of Fred not yet
converted to use NIO. These are currently used by Freenet's HTTP
interfaces.
* Messages are received entirely asynchronously, unless they have
trailing fields.
* Trailing fields (i.e. transfer of actual files) still require a
thread, using node/states/data/, and a pseudo-blocking stream
from ConnectionHandler.
* Messages (apart from their trailing fields) can be sent
asynchronously, but currently this is only used to implement
blocking send for the existing code in node/states/.
* We no longer allocate one thread for each ConnectionHandler.
This alone yields a significant saving on threads. This is
important because a) it uses less CPU, b) it uses less threads,
which may be a scarce resource, c) perceived load to the user
is higher with insane numbers of threads running on many
operating systems such as linux, and d) the node's estimation of
its current load is determined partially by the number of
threads in use.
* Initial connection negotiations still require a thread to
themselves.
* Expected benefits, observed by some testers: the node can handle
more requests per hour with less CPU, big splitfile
downloads/uploads don't overload the node as much and probably
perform better, and because of the first item it should reject
fewer queries.
Other work in this build:
* FCP inserts no longer cause insanely high routing times, causing
the node to think it is overloaded when it is not.
* Wierd behaviour involving a connection being opened at the same
time as a response comes in no longer causes long routing times.
* Network load is estimated as soon as we pass 100 queries rather
than waiting for a checkpoint.
* An estimate of the amount of memory used by the logger is added
to the Environment page.
* A zero byte node file is ignored and replaced, the ARKcrypt
field is ignored and replaced if it is too short.
* Lots of logging, some of it debug stuff that will be removed
when we are sure that nio works fully, some of it improvements
to existing logging, some of it eliminating the impact of debug
logging when not in logLevel=debug. Lots of toString()'s.
Tracking of numbers of various interesting objects, dumped to
logfile at aggressiveGC checkpoint time and on an
OutOfMemoryError - we think we have fixed the leaks though.
* Lots more bug fixes, tidy ups and miscellanea.
Once again, this is a whole raft of fairly major changes, and there are
likely unresolved bugs. If you want an stable node, stick with the
stable branch. If you want to participate in testing, bug reporting, bug
finding and/or bug fixing of what will be a key feature for 0.5.2 and
will most likely lead to significant network improvements, we need your
help. It has been moved to unstable because it more or less works and we
need wider testing before putting it into stable and a prerelease.
--
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
pgp00000.pgp
Description: PGP signature
