[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13529335#comment-13529335
 ] 

Nikita Vetoshkin commented on ZOOKEEPER-1474:
---------------------------------------------

Took a look at this one and came with a better implementation.
Spawning new {{bash}} process is a heavyweight operation (compared to a few fs 
system calls) especially if it's a huge server process:
* although linux uses copy-on-write during {{fork}} it's still an expensive 
operation because it needs to create new process and walk through all memory 
pages to mark them as readonly
* despite of linux overcommit feature we can receive {{ENOMEM}} if host is 
running out of RAM

I'm attaching new patch, which is simplier. Please, take a look. Maybe it lacks 
comments, but works.
                
> Cannot build Zookeeper with IBM Java: use of Sun MXBean classes
> ---------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1474
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1474
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.4.0, 3.4.3, 3.4.4, 3.4.5
>            Reporter: Adalberto Medeiros
>            Assignee: Paulo Ricardo Paz Vital
>              Labels: build
>             Fix For: 3.5.0, 3.4.6
>
>         Attachments: don_t_use_bash_to_get_stats.patch, zookeeper-1474.patch, 
> zookeeper-1474-v2.patch, zookeeper-1474-v3.patch, ZOOKEEPER-1474-v4.patch, 
> ZOOKEEPER-1474-v5.patch, ZOOKEEPER-1474-v6.patch
>
>
> zookeeper.server.NIOServerCnxn and zookeeper.server.NettyServerCnxn imports 
> com.sun.management.UnixOperatingSystemMXBean . This OperatingSystemMXBean 
> class is not implemented by IBM or open java. 
> In my case, I need IBM Java so I can run zookeeper in Power ppc64 servers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to