FYI, how to limit CPU usage of H2O on different operating systems

250 views
Skip to first unread message

Tom Kraljevic

unread,
Sep 11, 2014, 6:30:17 PM9/11/14
to SriSatish Ambati, h2ostream

How to limit the CPU usage of H2O on different operating systems.



On windows:

You can start h2o explicitly from a CMD shell and specify /AFFINITY.
0x1 is a bitmask specifying H2O should use one core.  Adapt to your needs.

CMD> start /AFFINITY 0x1 java -Xmx4g -jar h2o.jar



On linux:

You can start h2o explicitly from a shell and wrap it with the taskset command.
0x1 is a bitmask specifying H2O should use one core.  Adapt to your needs.

% taskset 0x1 java -Xmx4g -jar h2o.jar



On mac:

We looked really hard, and MacOSX doesn’t seem to support processor affinity in they way the other OS’s do.
‘nice’ h2o instead.
If you find a better way, let us know!
(Note:  We tried various experiments with the thread_policy_set and THREAD_AFFINITY_POLICY but it didn’t do what we were wanting.)

% nice 20 java -Xmx4g -jar h2o.jar



Tom


On Sep 11, 2014, at 2:44 PM, SriSatish Ambati <sris...@0xdata.com> wrote:

fyi.  
---------- Forwarded message ----------
From: Unconsenting (via Twitter) <not...@twitter.com>
Date: Thu, Sep 11, 2014 at 1:38 PM
Subject: Unconsenting (@unconsenting) mentioned you on Twitter!
To: 0xdata <s...@0xdata.com>


@hexadata How can I leave a core or two free on my machine when running h2o? - @unconsenting
     
0xdata,
You were mentioned in a Tweet!
  0xdata
     
 
Unconsenting @unconsenting
  Follow Follow  
 
@hexadata How can I leave a core or two free on my machine when running h2o?
   
  08:38 PM - 11 Sep 14
   
 

Reply to @unconsenting
Retweet Favorite
Forgot your Twitter password? Get instructions on how to reset it.
You can also unsubscribe from these emails or change your notification settings. Need help?
If you received this message in error and did not sign up for Twitter, click not my account.



--
ceo & co-founder, 0xdata Inc

Reply all
Reply to author
Forward
0 new messages