Chef on windows uses 100% CPU


#1

Hi,

I’m currently testing chef (chef-solo) on windows to convince the windows
guys of chef.

But unfortunately a chef-solo run produces 100% CPU usage.

The whole execution time is not really important to me (at the moment 12
seconds with the “getting-started” cookbook),

but what’s critical is that the chef/ruby process eats up the whole cpu and
therefore blocks the whole system.

I’ve disabled a few ohai plugins, but that doesn’t change everything. Also
it’s not an disk I/O - problem , it’s pure CPU usage.

I’ve tried to limit the cpu usage of the chef/ruby process to 50% (with
Windows System Resource Manager), but no luck.

Is there any possibility to limit the cpu usage of the ruby process so that
a chef-run doesn’t block the whole system ? (i can’t convince the windows
guys of
chef if chef(or ruby) is blocking the whole system …)

Windows Server 2008 R2 SP1 x64
1vCPU, 2GB RAM

Chef 10.14.2 (http://opscode.com/chef/install.msi)


#2

What are the cookbooks/run-list? This is very odd.

Adam

On Sep 14, 2012, at 6:06 AM, bjunity@gmail.commailto:bjunity@gmail.com wrote:

Hi,

I’m currently testing chef (chef-solo) on windows to convince the windows guys of chef.

But unfortunately a chef-solo run produces 100% CPU usage.

The whole execution time is not really important to me (at the moment 12 seconds with the “getting-started” cookbook),

but what’s critical is that the chef/ruby process eats up the whole cpu and therefore blocks the whole system.

I’ve disabled a few ohai plugins, but that doesn’t change everything. Also it’s not an disk I/O - problem , it’s pure CPU usage.

I’ve tried to limit the cpu usage of the chef/ruby process to 50% (with Windows System Resource Manager), but no luck.

Is there any possibility to limit the cpu usage of the ruby process so that a chef-run doesn’t block the whole system ? (i can’t convince the windows guys of
chef if chef(or ruby) is blocking the whole system …)

Windows Server 2008 R2 SP1 x64
1vCPU, 2GB RAM

Chef 10.14.2 (http://opscode.com/chef/install.msi)


#3

Hi Adam,

only one simple cookbook:

http://community.opscode.com/cookbooks/getting-started (0.4.0)

node.json:

“run_list”: [ “getting-started” ]

2012/9/17 Adam Jacob adam@opscode.com

What are the cookbooks/run-list? This is very odd.

Adam

On Sep 14, 2012, at 6:06 AM, bjunity@gmail.com wrote:

Hi,

I’m currently testing chef (chef-solo) on windows to convince the windows
guys of chef.

But unfortunately a chef-solo run produces 100% CPU usage.

The whole execution time is not really important to me (at the moment 12
seconds with the “getting-started” cookbook),

but what’s critical is that the chef/ruby process eats up the whole cpu
and therefore blocks the whole system.

I’ve disabled a few ohai plugins, but that doesn’t change everything. Also
it’s not an disk I/O - problem , it’s pure CPU usage.

I’ve tried to limit the cpu usage of the chef/ruby process to 50% (with
Windows System Resource Manager), but no luck.

Is there any possibility to limit the cpu usage of the ruby process so
that a chef-run doesn’t block the whole system ? (i can’t convince the
windows guys of
chef if chef(or ruby) is blocking the whole system …)

Windows Server 2008 R2 SP1 x64
1vCPU, 2GB RAM

Chef 10.14.2 (http://opscode.com/chef/install.msi)


#4

Adam,

100% CPU on Windows nodes has always been the norm for us. We tried beefing up our systems with a minimum of two cores, but we found that the client runs still had significant impact on the systems, even with very basic cookbooks. We ended up moving away from running chef-client on regular intervals on Windows since the impact to our production environment was too great.

Chef 0.10.8 was the last version we checked CPU usage on. We will be rolling out 10.14.2 on the Windows side soon.

Tim Smith

Operations Engineer, SaaS Operations

M: +1 707.738.8132

TW: @tas50

webtrendshttp://www.webtrends.com/

Real-Time Relevance. Remarkable ROI.™

London | Portland | San Francisco | Melbourne | Tokyo

From: "bjunity@gmail.commailto:bjunity@gmail.com" <bjunity@gmail.commailto:bjunity@gmail.com>
Reply-To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Date: Monday, September 17, 2012 1:19 PM
To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: [chef] Re: Re: chef on windows uses 100% CPU

Hi Adam,

only one simple cookbook:

http://community.opscode.com/cookbooks/getting-started (0.4.0)

node.json:

“run_list”: [ “getting-started” ]

2012/9/17 Adam Jacob <adam@opscode.commailto:adam@opscode.com>
What are the cookbooks/run-list? This is very odd.

Adam

On Sep 14, 2012, at 6:06 AM, bjunity@gmail.commailto:bjunity@gmail.com wrote:

Hi,

I’m currently testing chef (chef-solo) on windows to convince the windows guys of chef.

But unfortunately a chef-solo run produces 100% CPU usage.

The whole execution time is not really important to me (at the moment 12 seconds with the “getting-started” cookbook),

but what’s critical is that the chef/ruby process eats up the whole cpu and therefore blocks the whole system.

I’ve disabled a few ohai plugins, but that doesn’t change everything. Also it’s not an disk I/O - problem , it’s pure CPU usage.

I’ve tried to limit the cpu usage of the chef/ruby process to 50% (with Windows System Resource Manager), but no luck.

Is there any possibility to limit the cpu usage of the ruby process so that a chef-run doesn’t block the whole system ? (i can’t convince the windows guys of
chef if chef(or ruby) is blocking the whole system …)

Windows Server 2008 R2 SP1 x64
1vCPU, 2GB RAM

Chef 10.14.2 (http://opscode.com/chef/install.msi)


#5

100 % agree with you, Tim.

@Adam
Should I file a bug for this ?

2012/9/17 Tim Smith Tim.Smith@webtrends.com

Adam,

100% CPU on Windows nodes has always been the norm for us. We tried
beefing up our systems with a minimum of two cores, but we found that the
client runs still had significant impact on the systems, even with very
basic cookbooks. We ended up moving away from running chef-client on
regular intervals on Windows since the impact to our production environment
was too great.

Chef 0.10.8 was the last version we checked CPU usage on. We will be
rolling out 10.14.2 on the Windows side soon.

*Tim Smith*

Operations Engineer, SaaS Operations

M: +1 707.738.8132

TW: @tas50

webtrends http://www.webtrends.com/

Real-Time Relevance. Remarkable ROI.™

London | Portland | San Francisco | Melbourne | Tokyo

From: "bjunity@gmail.com" bjunity@gmail.com
Reply-To: "chef@lists.opscode.com" chef@lists.opscode.com
Date: Monday, September 17, 2012 1:19 PM
To: "chef@lists.opscode.com" chef@lists.opscode.com
Subject: [chef] Re: Re: chef on windows uses 100% CPU

Hi Adam,

only one simple cookbook:

http://community.opscode.com/cookbooks/getting-started (0.4.0)

node.json:

“run_list”: [ “getting-started” ]

2012/9/17 Adam Jacob adam@opscode.com

What are the cookbooks/run-list? This is very odd.

Adam

On Sep 14, 2012, at 6:06 AM, bjunity@gmail.com wrote:

Hi,

I’m currently testing chef (chef-solo) on windows to convince the windows
guys of chef.

But unfortunately a chef-solo run produces 100% CPU usage.

The whole execution time is not really important to me (at the moment 12
seconds with the “getting-started” cookbook),

but what’s critical is that the chef/ruby process eats up the whole cpu
and therefore blocks the whole system.

I’ve disabled a few ohai plugins, but that doesn’t change everything.
Also it’s not an disk I/O - problem , it’s pure CPU usage.

I’ve tried to limit the cpu usage of the chef/ruby process to 50% (with
Windows System Resource Manager), but no luck.

Is there any possibility to limit the cpu usage of the ruby process so
that a chef-run doesn’t block the whole system ? (i can’t convince the
windows guys of
chef if chef(or ruby) is blocking the whole system …)

Windows Server 2008 R2 SP1 x64
1vCPU, 2GB RAM

Chef 10.14.2 (http://opscode.com/chef/install.msi)