You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by "Claude Warren, Jr via dev" <de...@cassandra.apache.org> on 2023/10/24 12:48:19 UTC

CASSANDRA-16565

I am working on https://issues.apache.org/jira/browse/CASSANDRA-16565 and
have a small testing program that executes the sigar and equivalent OSHI
methods to verify that they are the same.  I would like to have this run on
various platforms.

I have tgz with all the libraries and code as well as a run.sh bash script
to compile and execute it.

Is there someplace I can stash the tgz that others can download it from?
The file info is : 6269066 okt 24 12:46 compare_oshi_sigar.tgz

OSHI does not implement all the methods that Sigar does and there is a
difference in the bitness (32/64 bit) of the results.

*Maximum Virtual Memory*

Sigar dates  from the time of 32 bit OS and so when checking for things
like maximum virtual memory it returns -1 (INFINITE) for any value over
0x7fffffff.

OSHI on the other hand is 64 bit aware and will return long values for the
maximum virtual memory.  Looking at tools like "ulimit" it converts
anything over 0x7fffffff to the text "infinite" in the return.

To handle this I set the expected Virtual memory to be 0x7FFFFFFFl and
accept any value >= that or  -1 as  the acceptable value.

*Maximum Processes*

This appears to be the value of "ulimit -u" which is not supported in
OSHI.  However, on Linux (and I think Mac OS) we can make a call to the
bash interpreter to return "uname -u".  On other systems I log that we
don't have a way to get this value and return the standard default max
processes of 1024.  This will cause the "warnIfRunningInDegradedMode" to
warn about possible degradation.

Claude

Re: CASSANDRA-16565

Posted by "Claude Warren, Jr via dev" <de...@cassandra.apache.org>.
I ended up posting the code at
https://github.com/Aiven-Labs/compare_oshi_sigar if anyone wants to take a
look and see if they get differing results on various systems.

On Tue, Oct 24, 2023 at 4:59 PM Brandon Williams <dr...@gmail.com> wrote:

> On Tue, Oct 24, 2023 at 7:48 AM Claude Warren, Jr via dev
> <de...@cassandra.apache.org> wrote:
> >
> > Is there someplace I can stash the tgz that others can download it from?
> The file info is : 6269066 okt 24 12:46 compare_oshi_sigar.tgz
>
> Is posting a github branch not sufficient?
>

Re: CASSANDRA-16565

Posted by Brandon Williams <dr...@gmail.com>.
On Tue, Oct 24, 2023 at 7:48 AM Claude Warren, Jr via dev
<de...@cassandra.apache.org> wrote:
>
> Is there someplace I can stash the tgz that others can download it from? The file info is : 6269066 okt 24 12:46 compare_oshi_sigar.tgz

Is posting a github branch not sufficient?