Hi Eric, thanks for the detailed explanation. Could you check if my understanding is then correct?
* The warmd_agent (which feeds warmd additional warming requests) is only launched during Aqua logins, so if my cold boot test used auto-login my application would not be warmed (even if it was in the Most Recently used list).
This gives us enough information to do manual boot tests both with warmd and without.
-----Original Message-----
From: Eric Gouriou [mailto:email@hidden]
Sent: Friday, September 04, 2009 11:03 AM
To: Jeffrey Weston
Cc: email@hidden
Subject: Re: More information on 'warmd'?
Hello Jeffrey,
Shantonu was kind enough to forward your email. I have since joined
the boot-dev list.
I am an Apple employee and was involved in the development of warmd. I
am
responding in that capacity in this message, even though I avoid using
my @apple.com
address on public mailing lists.
>> Hello,
>>
>> I'm wondering if I could get some more information on the new
>> Warming Daemon in Snow Leopard called 'warmd'. In the man page is
>> says that it 'pre-heats commonly used files'.
Let me give an overall description of its working before I address
your questions. Please note
that those are all implementation details, always subject to change
without notice. If there is
a desire for more guarantees, please file enhancement requests.
Upon boot, the warmd launch daemon process warms system-wide
resources once it deems
that the boot is done. This primarily consists in pre-fetching the 32b/
64b dyld shared caches while
attempting to remain out of the way of regular usage. If warmd detects
that the boot was to the login UI
(vs. auto-login), warmd will also pre-warm some login-specific files
to speed up an incoming Aqua login.
While performing this work, warmd also listens for warming requests
from its associated launch
agent, warmd_agent. warmd will wait for such requests for a little
while after its launch to help the case
of a user booting to the login UI and login a little while later. The
maximum wait is 10min today.
warmd_agent is only launched during Aqua logins. It retrieves the
list of the 10 most recent
applications launched by the user, as reported by LaunchServices. This
matches the Recent Items / Applications
list present in the Apple menu. For those, the path to the main
executable is retrieved from the Info.plist .
The "native" slice of that executable is then pre-warmed by warmd. No
provision is made for respecting
alternate launch choices, e.g. on a system running the x86_64 slice of
warmd we will always warm
the x86_64 slice of that executable if present, even if the user asked
for that application to launch
in 32bit mode. When an x86_64 slice is missing, an i386 slice will be
pre-warmed if present.
warming is limited to files on the root volume. This limitation is
in place to avoid triggering mounts
or spinning disks up unnecessarily.
>> We are wanting to get accurate measurements of Cold Boot timings on
>> Snow Leopard, both when warmd is working on our applications and
>> also when it is not.
>>
>> So I'm wondering:
>>
>> * Is there a way to tell if warmd was used on our application?
There is no supported mechanism in place to do so. I'd recommend
relying
on the presence/absence of the application in the Recent Applications
list prior to the boot.
If this is not workable, please file a bug report.
>> * Is there a way to prevent warmd from being used? (to simulate a
>> case were our applications are not 'commonly used files'.)
There is no supported way to so.
On SnowLeopard 10.6.0, warmd_agent will respect a "--no-recent-apps"
command-line option
(add it to the plist ProgramArguments array) and will not send those
warming requests to the daemon.
Please file an enhancement request if you want to make use of this in
your infrastructure. The name
of the option is a bit too tied to implementation details for my
taste, but it's not so bad that we couldn't
document it and support it if there is a business need.
warmd_agent has other duties besides sending those requests, hence I
cannot recommend removing/disabling
the agent. Similarly I recommend against removing/disabling the warmd
launch daemon. It would
be harmful in your case as a system booted without warmd present is
not representative for launch
measurements.
>> * Is there more information on how 'commonly used files' is
>> determined? (So we can setup tests that specifically make use of
>> warmd)
I believe the description above covers this question.
I hope this helps,
Eric
>> Thanks
>>
>> Jeffrey Weston, Macintosh Business Unit, Microsoft
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Boot-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden