[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
Hmm, cool. Can you send me a patch to detect OS/X and automatically fix
it? I'm not sure how we would tell the node about it...

On Fri, Sep 30, 2005 at 07:31:15PM +, Squished Squirrel wrote:
> Matthew Toseland  writes:
> 
> > 
> > Umm, you can raise the descriptor limit as a regular user on OS/X?!
> > Please check what value it was before and after...
> > 
> 
> Yes, you can change the limit as a standard or admin user on OSX.
> 
> The page that describes it pretty well is:
> 
> http://www.amug.org/~glguerin/howto/More-open-files.html
> 
> Here is the reult:
> 
> sh-2.05b$ ulimit -a
> 
> core file size(blocks, -c) 0
> data seg size (kbytes, -d) 6144
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) unlimited
> max memory size   (kbytes, -m) unlimited
> open files(-n) 256
> pipe size  (512 bytes, -p) 1
> stack size(kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes(-u) 100
> virtual memory(kbytes, -v) unlimited
> 
> sh-2.05b$ ulimit -S -n 1024
> 
> sh-2.05b$ ulimit -a
> 
> core file size(blocks, -c) 0
> data seg size (kbytes, -d) 6144
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) unlimited
> max memory size   (kbytes, -m) unlimited
> open files(-n) 1024
> pipe size  (512 bytes, -p) 1
> stack size(kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes(-u) 100
> virtual memory(kbytes, -v) unlimited
> 
> ___
> Support mailing list
> Support at freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:support-request at freenetproject.org?subject=unsubscribe

-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/support/attachments/20050930/5c230518/attachment.pgp>


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland  writes:

> 
> Hmm, cool. Can you send me a patch to detect OS/X and automatically fix
> it? I'm not sure how we would tell the node about it...
> 

Sure. Let me get this machine home and running a few days to make sure
it all works first. There is a good possibility I am talking out my ass about
all this ;-)

Yeh, I don't know how you could verify that the fd limit had been upped
within a java program. I think the safest thing to do is to continue to default
OSX boxes to 128 maxNodeConnections, and in the start script and README,
put comments explaining that if you uncomment and up the node count, you
MUST use the start-freenet.sh shell script to start freenet so it can increase
the fd limit.




[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland  writes:

> 
> Umm, you can raise the descriptor limit as a regular user on OS/X?!
> Please check what value it was before and after...
> 

Ohh, to clarify, you are correct in that you can't change the HARD limit on
file descriptors, but that isn't a problem because the hard limit is set
to unlimited. The hard limit is only limited by the system limit for all
processes, which is over 12000.

The soft limit is the only one that needs to be upped, since it is what is
capping us at 256.

So, trying to do:

ulimit -n 1024

might fail because it is trying to change both the soft and hard limits,
whereas:

ulimit -S -n 1024

Is just changing the soft limit (the hard limit is unlimited...)





[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland  writes:

> 
> Umm, you can raise the descriptor limit as a regular user on OS/X?!
> Please check what value it was before and after...
> 

Yes, you can change the limit as a standard or admin user on OSX.

The page that describes it pretty well is:

http://www.amug.org/~glguerin/howto/More-open-files.html

Here is the reult:

sh-2.05b$ ulimit -a

core file size(blocks, -c) 0
data seg size (kbytes, -d) 6144
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size   (kbytes, -m) unlimited
open files(-n) 256
pipe size  (512 bytes, -p) 1
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 100
virtual memory(kbytes, -v) unlimited

sh-2.05b$ ulimit -S -n 1024

sh-2.05b$ ulimit -a

core file size(blocks, -c) 0
data seg size (kbytes, -d) 6144
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size   (kbytes, -m) unlimited
open files(-n) 1024
pipe size  (512 bytes, -p) 1
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 100
virtual memory(kbytes, -v) unlimited




[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
Umm, you can raise the descriptor limit as a regular user on OS/X?!
Please check what value it was before and after...

On Fri, Sep 30, 2005 at 04:38:48PM +, Squished Squirrel wrote:
> Paul  writes:
> 
> > 
> > Can we get this Mac OS X native jbigi library incorporated in to 
> > future Freenet releases?
> > 
> > I've been running Freenet on Mac OS X for about two years now. It 
> > usually runs for 2 to 7 days before it grinds to a halt with either 
> > an out of memory error or some kind of error in the "abstractor loop".
> > 
> > Having better performance while Freenet is up would be great. Fixing 
> > the above errors would also be nice.
> > 
> > Thanks,
> > Paul
> > 
> 
> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.
> 
> For my test this weekend, I'm gonna go for broke and use the
> latest JVM available for Tiger (1.5.0_04-39) and see how it
> goes. (If anyone else installs it, keep in mind your computer
> will continue to use the 1.4.X version unless you change a
> specific directory link, or use a hard coded path to the java
> 1.5 binary.)
> 
> I did see some things in the start-freenet.sh script that
> might need to be changed to improve performance/clarity.
> 
> First, it doesn't set the java argument -xx:MaxDirectMemorySize
> if you are running on OSX with JVM 1.4.2 or later. That is a
> legit flag for the OSX Sun JVM, so I don't know why it skips that
> argument only on OSX (Darwin). I'm just commenting out the
> "if" and "fi" statements above and below the line that sets
> that argument.
> 
> Second, when launched on a machine running a JVM later than
> 1.4.2, it still says you are using 1.4.2. It should say:
> "Sun Java 1.4.2 or later detected."
> 
> Finally, as the readme suggests, I'm adding these lines to the
> start script just before the "Starting freenet now" line:
> 
> if test `uname` == "Darwin"; then
> ulimit -S -n 1024
> fi
> 
> That ups the file descriptor limit to the same as the default
> on other platforms. After that, you need to up the
> "maxNodeConnections" parameter to 512 in the config file.
> 
> I'm also upping the memory limit to -Xmx256m just because the
> machine has a decent amount of ram.
> 
> With these changes, OSX should be running with the same
> parameters as linux or windows.
> 
> ___
> Support mailing list
> Support at freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:support-request at freenetproject.org?subject=unsubscribe

-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/support/attachments/20050930/a067a9dd/attachment.pgp>


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
The errors are probably platform deficiencies... We will try to
incorporate support for OS/X though, since we have a patch for it, and
I'm sure Ian can provide an OS/X binary library to incorporate...

On Thu, Sep 29, 2005 at 11:07:57PM -0700, Paul wrote:
> Can we get this Mac OS X native jbigi library incorporated in to 
> future Freenet releases?
> 
> I've been running Freenet on Mac OS X for about two years now. It 
> usually runs for 2 to 7 days before it grinds to a halt with either 
> an out of memory error or some kind of error in the "abstractor loop".
> 
> Having better performance while Freenet is up would be great. Fixing 
> the above errors would also be nice.
> 
> Thanks,
> Paul
> 
> 
> Squished Squirrel  writes:
> 
> >
> > Matthew Toseland  ...> writes:
> >
> > >
> > > Cool. What code changes?
> > >
> >
> > I added a couple case statements to NativeBigInteger.java, similar to 
> > those
> > suggested by Josh Watzman earlier this month. I think his diff also added
> > support for loading an external jbigi library without having to rebuild 
> > the
> > freenet-ext.jar file. My changes only work if the library is put 
> >into the jar.
> > I'm *assuming* that his code changes result in a requested library name
> > of "libjbigi-osx-none.jnilib". I don't know for sure, since I found his 
> > diff
> > after I had already made my changes.
> >
> > I used the jbigi source from i2p since the build scripts for it had 
> > already
> > been modified to support OSX. The resulting file was libjbigi.jnilib, 
> > which
> > just needed to be renamed to "libjbigi-osx-none.jnilib" and inserted into
> > freenet-ext.jar.
> >
> > The i2p_0_6_0_6 source builds the jbigi library static, so I'm hoping that
> > it will run fine on a Mac that doesn't have gmp installed. Someone else
> > said they had managed to build the library on the Mac, but their library 
> > was
> > dynamic and would only run on a Mac with gmp already installed (or
> > something to that effect.)
> >
> > After the osx jbigi library is inserted in to the freenet-ext.jar, I 
> > dropped
> > that into the lib folder of the current stable source and built the 
> > project
> > using ant.
> >
> > I won't discuss how many wrong turns I made on the way
> >
> > And the result on starting freenet...
> >
> > INFO: Non-optimized native BigInteger library
> > 'net/i2p/util/libjbigi-osx-none.jnilib' loaded from resource
> >
> >
> ___
> Support mailing list
> Support at freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at 
> http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:support-request at freenetproject.org?subject=unsubscribe

-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/support/attachments/20050930/a094d19b/attachment.pgp>


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Bob
Squished Squirrel  writes:

==snip==
> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.
==snip==

Yes, it looks that way. Apparently it only affects dual processor Macs, although
it can make single CPU ones very slow.

http://cvs.sourceforge.net/viewcvs.py/azureus/azureus2/ChangeLog.txt?rev=HEAD
2004.12.18 | Azureus 2.2.0.2
(...)
"BUGFIX: Core | Fix for kernel panics under MacOSX [ej32206, Nolar]"

"Karl Kraft" here claims to have sent a testcase for the issue (panic with pure
java only) to Sun and they ignored it, but doesn't say what it is exactly and I
can't find it.
http://www.macintouch.com/panreader34.html

Diff for the Azureus fix (multilined for gmane) :
http://sourceforge.net/mailarchive/forum.php?
forum_id=40629&style=flat&viewday=17&viewmonth=200408

Bob





[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Paul  writes:

> 
> Can we get this Mac OS X native jbigi library incorporated in to 
> future Freenet releases?
> 
> I've been running Freenet on Mac OS X for about two years now. It 
> usually runs for 2 to 7 days before it grinds to a halt with either 
> an out of memory error or some kind of error in the "abstractor loop".
> 
> Having better performance while Freenet is up would be great. Fixing 
> the above errors would also be nice.
> 
> Thanks,
> Paul
> 

I'm about to test it over the weekend and see what happens.
I know Java 1.4.2 (at least the latest version installed
with 10.3.9) will crater with Kernel Panics. It sounds a lot
like the problems that Azureus suffered from on Dual Processor
Macs. When too many connections were opened simultaniously,
Azureus would kernel panic. Apparently they found a work-
around though.

For my test this weekend, I'm gonna go for broke and use the
latest JVM available for Tiger (1.5.0_04-39) and see how it
goes. (If anyone else installs it, keep in mind your computer
will continue to use the 1.4.X version unless you change a
specific directory link, or use a hard coded path to the java
1.5 binary.)

I did see some things in the start-freenet.sh script that
might need to be changed to improve performance/clarity.

First, it doesn't set the java argument -xx:MaxDirectMemorySize
if you are running on OSX with JVM 1.4.2 or later. That is a
legit flag for the OSX Sun JVM, so I don't know why it skips that
argument only on OSX (Darwin). I'm just commenting out the
"if" and "fi" statements above and below the line that sets
that argument.

Second, when launched on a machine running a JVM later than
1.4.2, it still says you are using 1.4.2. It should say:
"Sun Java 1.4.2 or later detected."

Finally, as the readme suggests, I'm adding these lines to the
start script just before the "Starting freenet now" line:

if test `uname` == "Darwin"; then
ulimit -S -n 1024
fi

That ups the file descriptor limit to the same as the default
on other platforms. After that, you need to up the
"maxNodeConnections" parameter to 512 in the config file.

I'm also upping the memory limit to -Xmx256m just because the
machine has a decent amount of ram.

With these changes, OSX should be running with the same
parameters as linux or windows.




[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Josh Watzman
Squished Squirrel wrote:
> My changes only work if the library is put into the jar.
> I'm *assuming* that his code changes result in a requested library name
> of "libjbigi-osx-none.jnilib". I don't know for sure, since I found his diff
> after I had already made my changes.

Just like I2P, if you *don't* put it in the jar, you can place
"libjbigi.jnilib" in the main freenet directory. Other names such as
that might work, I haven't tested them. I haven't tested actually
putting the library into the jar, either.

> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.

It works well. No kernel panics after running for over 2 days, and it
used to do so in about 2 hours. The Azureus problem seems to be a
different one, however. It only affected DP Macs, but I have personally
had hard freezes on a single-processor iMac. A similar workaround might
still fix it on older JVMs, but it looks like the underlying bug is
fixed in 1.5 anyways.

--
--
Believe nothing, no matter where you read it, or who said it, no matter
if I have said it, unless it agrees with your own reason and your own
common sense.
  -- Gautama Buddha
--

I always PGP/gpg sign my emails... if it isn't signed, it's probably not
from me!
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: 
<https://emu.freenetproject.org/pipermail/support/attachments/20050930/39dff452/attachment.pgp>


Re: [freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Josh Watzman
Squished Squirrel wrote:
> My changes only work if the library is put into the jar.
> I'm *assuming* that his code changes result in a requested library name
> of "libjbigi-osx-none.jnilib". I don't know for sure, since I found his diff
> after I had already made my changes.

Just like I2P, if you *don't* put it in the jar, you can place
"libjbigi.jnilib" in the main freenet directory. Other names such as
that might work, I haven't tested them. I haven't tested actually
putting the library into the jar, either.

> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.

It works well. No kernel panics after running for over 2 days, and it
used to do so in about 2 hours. The Azureus problem seems to be a
different one, however. It only affected DP Macs, but I have personally
had hard freezes on a single-processor iMac. A similar workaround might
still fix it on older JVMs, but it looks like the underlying bug is
fixed in 1.5 anyways.

--
--
Believe nothing, no matter where you read it, or who said it, no matter
if I have said it, unless it agrees with your own reason and your own
common sense.
  -- Gautama Buddha
--

I always PGP/gpg sign my emails... if it isn't signed, it's probably not
from me!


signature.asc
Description: OpenPGP digital signature
___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]

[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland <[EMAIL PROTECTED]> writes:

> 
> Hmm, cool. Can you send me a patch to detect OS/X and automatically fix
> it? I'm not sure how we would tell the node about it...
> 

Sure. Let me get this machine home and running a few days to make sure
it all works first. There is a good possibility I am talking out my ass about
all this ;-)

Yeh, I don't know how you could verify that the fd limit had been upped
within a java program. I think the safest thing to do is to continue to default
OSX boxes to 128 maxNodeConnections, and in the start script and README,
put comments explaining that if you uncomment and up the node count, you
MUST use the start-freenet.sh shell script to start freenet so it can increase
the fd limit.

___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland <[EMAIL PROTECTED]> writes:

> 
> Umm, you can raise the descriptor limit as a regular user on OS/X?!
> Please check what value it was before and after...
> 

Ohh, to clarify, you are correct in that you can't change the HARD limit on
file descriptors, but that isn't a problem because the hard limit is set
to unlimited. The hard limit is only limited by the system limit for all
processes, which is over 12000.

The soft limit is the only one that needs to be upped, since it is what is
capping us at 256.

So, trying to do:

ulimit -n 1024

might fail because it is trying to change both the soft and hard limits,
whereas:

ulimit -S -n 1024

Is just changing the soft limit (the hard limit is unlimited...)


___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]


Re: [freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
Hmm, cool. Can you send me a patch to detect OS/X and automatically fix
it? I'm not sure how we would tell the node about it...

On Fri, Sep 30, 2005 at 07:31:15PM +, Squished Squirrel wrote:
> Matthew Toseland <[EMAIL PROTECTED]> writes:
> 
> > 
> > Umm, you can raise the descriptor limit as a regular user on OS/X?!
> > Please check what value it was before and after...
> > 
> 
> Yes, you can change the limit as a standard or admin user on OSX.
> 
> The page that describes it pretty well is:
> 
> http://www.amug.org/~glguerin/howto/More-open-files.html
> 
> Here is the reult:
> 
> sh-2.05b$ ulimit -a
> 
> core file size(blocks, -c) 0
> data seg size (kbytes, -d) 6144
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) unlimited
> max memory size   (kbytes, -m) unlimited
> open files(-n) 256
> pipe size  (512 bytes, -p) 1
> stack size(kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes(-u) 100
> virtual memory(kbytes, -v) unlimited
> 
> sh-2.05b$ ulimit -S -n 1024
> 
> sh-2.05b$ ulimit -a
> 
> core file size(blocks, -c) 0
> data seg size (kbytes, -d) 6144
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) unlimited
> max memory size   (kbytes, -m) unlimited
> open files(-n) 1024
> pipe size  (512 bytes, -p) 1
> stack size(kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes(-u) 100
> virtual memory(kbytes, -v) unlimited
> 
> ___
> Support mailing list
> Support@freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:[EMAIL PROTECTED]

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.


signature.asc
Description: Digital signature
___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]

[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Matthew Toseland <[EMAIL PROTECTED]> writes:

> 
> Umm, you can raise the descriptor limit as a regular user on OS/X?!
> Please check what value it was before and after...
> 

Yes, you can change the limit as a standard or admin user on OSX.

The page that describes it pretty well is:

http://www.amug.org/~glguerin/howto/More-open-files.html

Here is the reult:

sh-2.05b$ ulimit -a

core file size(blocks, -c) 0
data seg size (kbytes, -d) 6144
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size   (kbytes, -m) unlimited
open files(-n) 256
pipe size  (512 bytes, -p) 1
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 100
virtual memory(kbytes, -v) unlimited

sh-2.05b$ ulimit -S -n 1024

sh-2.05b$ ulimit -a

core file size(blocks, -c) 0
data seg size (kbytes, -d) 6144
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size   (kbytes, -m) unlimited
open files(-n) 1024
pipe size  (512 bytes, -p) 1
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 100
virtual memory(kbytes, -v) unlimited

___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]


Re: [freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
Umm, you can raise the descriptor limit as a regular user on OS/X?!
Please check what value it was before and after...

On Fri, Sep 30, 2005 at 04:38:48PM +, Squished Squirrel wrote:
> Paul <[EMAIL PROTECTED]> writes:
> 
> > 
> > Can we get this Mac OS X native jbigi library incorporated in to 
> > future Freenet releases?
> > 
> > I've been running Freenet on Mac OS X for about two years now. It 
> > usually runs for 2 to 7 days before it grinds to a halt with either 
> > an out of memory error or some kind of error in the "abstractor loop".
> > 
> > Having better performance while Freenet is up would be great. Fixing 
> > the above errors would also be nice.
> > 
> > Thanks,
> > Paul
> > 
> 
> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.
> 
> For my test this weekend, I'm gonna go for broke and use the
> latest JVM available for Tiger (1.5.0_04-39) and see how it
> goes. (If anyone else installs it, keep in mind your computer
> will continue to use the 1.4.X version unless you change a
> specific directory link, or use a hard coded path to the java
> 1.5 binary.)
> 
> I did see some things in the start-freenet.sh script that
> might need to be changed to improve performance/clarity.
> 
> First, it doesn't set the java argument -xx:MaxDirectMemorySize
> if you are running on OSX with JVM 1.4.2 or later. That is a
> legit flag for the OSX Sun JVM, so I don't know why it skips that
> argument only on OSX (Darwin). I'm just commenting out the
> "if" and "fi" statements above and below the line that sets
> that argument.
> 
> Second, when launched on a machine running a JVM later than
> 1.4.2, it still says you are using 1.4.2. It should say:
> "Sun Java 1.4.2 or later detected."
> 
> Finally, as the readme suggests, I'm adding these lines to the
> start script just before the "Starting freenet now" line:
> 
> if test `uname` == "Darwin"; then
> ulimit -S -n 1024
> fi
> 
> That ups the file descriptor limit to the same as the default
> on other platforms. After that, you need to up the
> "maxNodeConnections" parameter to 512 in the config file.
> 
> I'm also upping the memory limit to -Xmx256m just because the
> machine has a decent amount of ram.
> 
> With these changes, OSX should be running with the same
> parameters as linux or windows.
> 
> ___
> Support mailing list
> Support@freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:[EMAIL PROTECTED]

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.


signature.asc
Description: Digital signature
___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]

Re: [freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Matthew Toseland
The errors are probably platform deficiencies... We will try to
incorporate support for OS/X though, since we have a patch for it, and
I'm sure Ian can provide an OS/X binary library to incorporate...

On Thu, Sep 29, 2005 at 11:07:57PM -0700, Paul wrote:
> Can we get this Mac OS X native jbigi library incorporated in to 
> future Freenet releases?
> 
> I've been running Freenet on Mac OS X for about two years now. It 
> usually runs for 2 to 7 days before it grinds to a halt with either 
> an out of memory error or some kind of error in the "abstractor loop".
> 
> Having better performance while Freenet is up would be great. Fixing 
> the above errors would also be nice.
> 
> Thanks,
> Paul
> 
> 
> Squished Squirrel <[EMAIL PROTECTED]> writes:
> 
> >
> > Matthew Toseland  ...> writes:
> >
> > >
> > > Cool. What code changes?
> > >
> >
> > I added a couple case statements to NativeBigInteger.java, similar to 
> > those
> > suggested by Josh Watzman earlier this month. I think his diff also added
> > support for loading an external jbigi library without having to rebuild 
> > the
> > freenet-ext.jar file. My changes only work if the library is put 
> >into the jar.
> > I'm *assuming* that his code changes result in a requested library name
> > of "libjbigi-osx-none.jnilib". I don't know for sure, since I found his 
> > diff
> > after I had already made my changes.
> >
> > I used the jbigi source from i2p since the build scripts for it had 
> > already
> > been modified to support OSX. The resulting file was libjbigi.jnilib, 
> > which
> > just needed to be renamed to "libjbigi-osx-none.jnilib" and inserted into
> > freenet-ext.jar.
> >
> > The i2p_0_6_0_6 source builds the jbigi library static, so I'm hoping that
> > it will run fine on a Mac that doesn't have gmp installed. Someone else
> > said they had managed to build the library on the Mac, but their library 
> > was
> > dynamic and would only run on a Mac with gmp already installed (or
> > something to that effect.)
> >
> > After the osx jbigi library is inserted in to the freenet-ext.jar, I 
> > dropped
> > that into the lib folder of the current stable source and built the 
> > project
> > using ant.
> >
> > I won't discuss how many wrong turns I made on the way
> >
> > And the result on starting freenet...
> >
> > INFO: Non-optimized native BigInteger library
> > 'net/i2p/util/libjbigi-osx-none.jnilib' loaded from resource
> >
> >
> ___
> Support mailing list
> Support@freenetproject.org
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at 
> http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:[EMAIL PROTECTED]

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.


signature.asc
Description: Digital signature
___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]

[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Bob
Squished Squirrel <[EMAIL PROTECTED]> writes:

==snip==
> I'm about to test it over the weekend and see what happens.
> I know Java 1.4.2 (at least the latest version installed
> with 10.3.9) will crater with Kernel Panics. It sounds a lot
> like the problems that Azureus suffered from on Dual Processor
> Macs. When too many connections were opened simultaniously,
> Azureus would kernel panic. Apparently they found a work-
> around though.
==snip==

Yes, it looks that way. Apparently it only affects dual processor Macs, although
it can make single CPU ones very slow.

http://cvs.sourceforge.net/viewcvs.py/azureus/azureus2/ChangeLog.txt?rev=HEAD
2004.12.18 | Azureus 2.2.0.2
(...)
"BUGFIX: Core | Fix for kernel panics under MacOSX [ej32206, Nolar]"

"Karl Kraft" here claims to have sent a testcase for the issue (panic with pure
java only) to Sun and they ignored it, but doesn't say what it is exactly and I
can't find it.
http://www.macintouch.com/panreader34.html

Diff for the Azureus fix (multilined for gmane) :
http://sourceforge.net/mailarchive/forum.php?
forum_id=40629&style=flat&viewday=17&viewmonth=200408

Bob


___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Squished Squirrel
Paul <[EMAIL PROTECTED]> writes:

> 
> Can we get this Mac OS X native jbigi library incorporated in to 
> future Freenet releases?
> 
> I've been running Freenet on Mac OS X for about two years now. It 
> usually runs for 2 to 7 days before it grinds to a halt with either 
> an out of memory error or some kind of error in the "abstractor loop".
> 
> Having better performance while Freenet is up would be great. Fixing 
> the above errors would also be nice.
> 
> Thanks,
> Paul
> 

I'm about to test it over the weekend and see what happens.
I know Java 1.4.2 (at least the latest version installed
with 10.3.9) will crater with Kernel Panics. It sounds a lot
like the problems that Azureus suffered from on Dual Processor
Macs. When too many connections were opened simultaniously,
Azureus would kernel panic. Apparently they found a work-
around though.

For my test this weekend, I'm gonna go for broke and use the
latest JVM available for Tiger (1.5.0_04-39) and see how it
goes. (If anyone else installs it, keep in mind your computer
will continue to use the 1.4.X version unless you change a
specific directory link, or use a hard coded path to the java
1.5 binary.)

I did see some things in the start-freenet.sh script that
might need to be changed to improve performance/clarity.

First, it doesn't set the java argument -xx:MaxDirectMemorySize
if you are running on OSX with JVM 1.4.2 or later. That is a
legit flag for the OSX Sun JVM, so I don't know why it skips that
argument only on OSX (Darwin). I'm just commenting out the
"if" and "fi" statements above and below the line that sets
that argument.

Second, when launched on a machine running a JVM later than
1.4.2, it still says you are using 1.4.2. It should say:
"Sun Java 1.4.2 or later detected."

Finally, as the readme suggests, I'm adding these lines to the
start script just before the "Starting freenet now" line:

if test `uname` == "Darwin"; then
ulimit -S -n 1024
fi

That ups the file descriptor limit to the same as the default
on other platforms. After that, you need to up the
"maxNodeConnections" parameter to 512 in the config file.

I'm also upping the memory limit to -Xmx256m just because the
machine has a decent amount of ram.

With these changes, OSX should be running with the same
parameters as linux or windows.

___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]


[freenet-support] Re: OSX builds of freenet

2005-09-30 Thread Paul
Can we get this Mac OS X native jbigi library incorporated in to 
future Freenet releases?


I've been running Freenet on Mac OS X for about two years now. It 
usually runs for 2 to 7 days before it grinds to a halt with either 
an out of memory error or some kind of error in the "abstractor loop".


Having better performance while Freenet is up would be great. Fixing 
the above errors would also be nice.


Thanks,
Paul


Squished Squirrel <[EMAIL PROTECTED]> writes:



 Matthew Toseland  ...> writes:

 >
 > Cool. What code changes?
 >

 I added a couple case statements to NativeBigInteger.java, similar to those
 suggested by Josh Watzman earlier this month. I think his diff also added
 support for loading an external jbigi library without having to rebuild the
 freenet-ext.jar file. My changes only work if the library is put 
into the jar.

 I'm *assuming* that his code changes result in a requested library name
 of "libjbigi-osx-none.jnilib". I don't know for sure, since I found his diff
 after I had already made my changes.

 I used the jbigi source from i2p since the build scripts for it had already
 been modified to support OSX. The resulting file was libjbigi.jnilib, which
 just needed to be renamed to "libjbigi-osx-none.jnilib" and inserted into
 freenet-ext.jar.

 The i2p_0_6_0_6 source builds the jbigi library static, so I'm hoping that
 it will run fine on a Mac that doesn't have gmp installed. Someone else
 said they had managed to build the library on the Mac, but their library was
 dynamic and would only run on a Mac with gmp already installed (or
 something to that effect.)

 After the osx jbigi library is inserted in to the freenet-ext.jar, I dropped
 that into the lib folder of the current stable source and built the project
 using ant.

 I won't discuss how many wrong turns I made on the way

 And the result on starting freenet...

 INFO: Non-optimized native BigInteger library
 'net/i2p/util/libjbigi-osx-none.jnilib' loaded from resource



___
Support mailing list
Support@freenetproject.org
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]