[chef] RE: Chef load time on Windows


Chronological Thread 
  • From: < >
  • To: < >
  • Subject: [chef] RE: Chef load time on Windows
  • Date: Mon, 1 Aug 2011 17:15:38 +0200

Just disable these un interested ohai plugins, I give you my client
config, work well for me

log_level          :info
log_location       STDOUT
ssl_verify_mode    :verify_none
chef_server_url    "https://sw-5-32";
file_cache_path    "d:/chef/var/cache"
file_backup_path   "d:/chef/var/lib/backup"
pid_file           "d:/chef/var/run/client.pid"
cache_options({ :path => "d:/chef/var/cache/checksums", :skip_expires =>
true})
signing_ca_user "chef"
Mixlib::Log::Formatter.show_time = true
validation_client_name "chef-validator"
validation_key         "d:/chef/etc/validation.pem"
client_key             "d:/chef/etc/client.pem"

Ohai::Config[:disabled_plugins] = [
"windows::cpu",
"windows::network",
"windows::filesystem",
"c",
"erlang",
"groovy",
"lua",
"java",
"mono",
]


-----Mensaje original-----
De: Daniel Oliver 
[mailto:
 
Enviado el: lunes, 01 de agosto de 2011 17:11
Para: 

Asunto: [chef] Chef load time on Windows

Hi Chefs,

I've recently been looking at the run time for Chef on Windows - when
testing recipes, the 20-second start time is very frustrating when
compared
to the <1 second on Linux.

I'm no Ruby expert, and was beginning to accept the general consensus of
"Ruby on Windows is just slow".   However, I then came across the
ruby-perf
tool, and what I found surprised me.  Most of the load time was spent in
the
WIN32OLE gem; the calls that Windows plugins in Ohai are very slow.

By disabling most of the Windows plugins, load time of Chef dropped to
about
3 seconds; disabling all of the plugins I didn't need reduced the load
time
to 1.5 seconds.  Loading the faster_require gem reduces the load time to
0.6
seconds -- that's a 30x reduction!

While I wouldn't want to see the plugins disabled by default, I wanted
to
point this out to any other users working on Windows who are frustrated
by
the slow load time when it can be easily resolved for development and
maybe
controlled deployments.  Sorry if it's already well known.

In my client.rb:
Ohai::Config[:disabled_plugins] = [
# The following plugins are required for Chef to work
# "hostname","windows::hostname","windows::platform",
# I wanted the following plugins enabled
# "ruby","chef","ohai","platform",
"kernel","languages","c","cloud","ec2","network","rackspace","eucalyptus
",
"command","dmi","dmi_common","erlang","groovy","ip_scopes","java","keys"
,
"lua","mono","network_listeners","ohai_time","passwd","perl","php",
"python","uptime","virtualization","windows::network","windows::kernel",
"windows::virtualization","windows::cpu","windows::filesystem"
]

Dan.
---------------------------------------------------------------------------
ADVERTENCIA LEGAL
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información confidencial y/o sujeta al secreto profesional, cuya
divulgación no está permitida por la ley. Si no es vd. el destinatario de
este mensaje o lo ha recibido por error, queda informado de que la lectura,
utilización, divulgación y/o copia de este mensaje, cualquiera que fuera su
finalidad, está prohibida por la ley. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción. El correo electrónico y las comunicaciones por
medio de Internet no permiten asegurar la confidencialidad de los mensajes
que se transmiten ni su integridad o correcta recepción. Si no consintiese
la utilización del correo electrónico, le rogamos nos lo comunique de forma
inmediata. ING DIRECT no asume ninguna responsabilidad por estas
circunstancias.
---------------------------------------------------------------------------
LEGAL WARNING
This message is intended exclusively for its addressee and may contain
information that is CONFIDENTIAL and/or protected by a professional
privilege, protected from disclosure by law. If you are not the intended
recipient or you have received it in error, you are hereby notified that
any read, dissemination, disclosure and/or copy of this message, for any
purpose, is strictly prohibited by law. If this message has been received
in error, please immediately notify us vía e-mail and delete it. E-mail and
Internet do not guarantee the confidentiality, nor the completeness or
proper reception of the messages sent. Should you not agree to the use of
e-mail, you are kindly requested to notify us immediately. ING DIRECT does
not assume any liability for those circumstances.
---------------------------------------------------------------------------


  • [chef] RE: Chef load time on Windows, le.huy, 08/01/2011

Archive powered by MHonArc 2.6.16.

§