cfprefsd, the daemon behind every saved setting
The daemon every app talks to before it saves a setting: what it does with your Preferences folder, why two copies run, and when its CPU matters.
By Chethan Kumar S N · Updated
Of the names people search for in Activity Monitor, cfprefsd is the one that is genuinely everywhere, because it is not a feature daemon like bluetoothd or rapportd. It is infrastructure. Every preference any app reads or writes, every checkbox that persists, every setting a utility remembers, goes through it. On the Mac measured for this page, a 10-core MacBook Pro running macOS 27.0.1 with 26 days of uptime, there are two rows of it: one running as root, one running as the user, both the same 201,504-byte file. There is also a third copy living inside an iOS simulator runtime, which we will get to.
The name reads as random lowercase noise until you expand it: CoreFoundation Preferences daemon. CFPreferences is the C API macOS apps have used for preferences since the platform was young, NSUserDefaults is its Cocoa face, and the d is the same d as in distnoted and trustd, the suffix that means a daemon sits here. The daemon’s own binary carries the proof in its single version string: PROJECT:CoreFoundation. It is not its own project. It is CoreFoundation’s back end.
This page is built the way the other process pages in this series are built: from the daemon’s own manual entry, its own launch configuration, its own binary, an hour of its own logs, and a timed read, write and delete of a throwaway preference domain. Everything was measured read only on one Mac except that one experiment, which wrote a single preference to a domain that existed for ten seconds and was then removed. Every command used is at the end if you want to repeat any of it.
The 370-byte manual
The manual page for cfprefsd is 370 bytes long, and it is the most honest document in this series:
.Dd October 25th, 2011
.Nd defaults server
provides preferences services for the CFPreferences
and NSUserDefaults APIs.
There are no configuration options to cfprefsd.
Users should not run cfprefsd manually.
That is the whole description, dated October 25th, 2011, a time when Apple was moving preference access behind XPC and this daemon took over the job. There is a FILES section, there are no OPTIONS, and the two closing sentences are the entire operating manual: nothing to configure, do not run it yourself.
The tool people actually use to touch preferences, the defaults command, has a manual page of its own, freshly dated September 15, 2025 on this Mac. It opens with a one-line summary, access to the macOS user defaults system, documents every subcommand, and closes its HISTORY section with the sentence: first appeared in NeXTStep. Preferences as a user-visible concept predates macOS by decades. The word cfprefsd appears in that manual exactly zero times. The command’s own documentation never names the daemon that actually services it, which is the gap this page fills.
What it actually does
Apple’s developer page for NSUserDefaults, the API the overwhelming majority of apps use, describes it in one sentence: an interface to the user’s defaults database, which stores system-wide and app-specific settings. The page does not name the daemon either. What happens under that interface is the whole story:
An app calls NSUserDefaults, or CFPreferences underneath it, and no plist file is opened. Instead a message crosses an XPC connection to cfprefsd, which looks the domain up in its in-memory cache, reads the file only if it has to, checks whether this client is allowed to ask, and answers. Writes go the same way: the app hands the value to the daemon, and the daemon owns the file, the cache and the flush to disk.
The scale on this Mac: 717 property list files totalling 4.4 MB in ~/Library/Preferences, and 52 more in /Library/Preferences. Every one of them is a domain the daemon can be asked about, and apps ask about far more than exist, which becomes measurable later in the hour of logs.
You can watch the daemon answer in both directions at once. Write one preference with defaults, which crosses the XPC boundary, and read it back two ways: defaults read, which crosses the boundary again, and plutil -p on the file itself, which does not involve the daemon at all and just prints the bytes. The experiment, timed, is in a section below. Both answers agreed, which is the quiet point: the file on disk and the daemon’s view of it stayed coherent through the whole round trip.
Two copies, two jobs
The two rows in Activity Monitor come from two separate launchd jobs, and unlike distnoted, which runs one copy per session for more than twenty sessions, cfprefsd runs exactly two system copies: an agent for your login session and a daemon for the system.
| agent | daemon | |
|---|---|---|
| Job label | com.apple.cfprefsd.xpc.agent | com.apple.cfprefsd.xpc.daemon |
| Runs as | you | root |
| Argument | agent | daemon |
| Mach service | com.apple.cfprefsd.agent | com.apple.cfprefsd.daemon |
| Loaded for | every login session (Background) | the system |
| EnablePressuredExit | true | false |
| EnableTransactions | true | true |
| Open file limit | 512 | 512 |
Three details in that table are worth slowing down for.
The labels contain the word xpc, which is where the name people see in logs and crash reports comes from. A search for com.apple.cfprefsd.xpc.daemon is a search for the launchd job, not the process, and the mapping is one to one: label with xpc for the job, service without it for what clients connect to.
Neither plist contains KeepAlive. Most daemons in this series have it, and launchd keeps them alive because the plist says so. cfprefsd is pure on-demand: launchd registers the service name, and the first client to connect wakes the daemon up. The launchd print output for the user agent confirms how it actually started, with the immediate reason ipc (mach), a connection, not a schedule: runs 1, never exited, 26 days ago, and it has been answering ever since.
And the pressured-exit split is the reverse of what you might guess. The agent, running as you, can be reclaimed by the system under memory pressure. The daemon, running as root for the whole system, cannot. System wide preference state is treated as infrastructure that must survive a squeeze; your session’s cache is treated as rebuildable, because it is.
The job also runs with two environment hints launchd injected at start: MallocSpaceEfficient, which tells the allocator to trade a little speed for a smaller footprint, and an OSLogRateLimit of 64. Both are visible in launchctl print, and both fit the same brief: small, quiet, always answering.
A binary with six strings
The entire string table of /usr/sbin/cfprefsd, all four architecture slices of it, is six strings long:
@(#)PROGRAM:cfprefsd PROJECT:CoreFoundation-5027.0.69
com.apple.defaults
cfprefsd
com.apple.cfprefsd
Failure to configure quarantine: qtn_proc_alloc() failed
Failure to configure quarantine: qtn_proc_apply_to_self() failed. Exiting daemon.
For comparison, distnoted’s binary carries 331 strings and this daemon carries six. One is the version line naming its parent project. Two name it. One names a second endpoint, com.apple.defaults, that appears in launchd’s service listings nowhere on this Mac, but shows up constantly somewhere else: as the logging subsystem in its own log output. And the last two are the only error text the program ships, about quarantine, the Gatekeeper machinery that checks files flagged as downloaded: if the daemon cannot configure its quarantine screening, it exits. A preferences daemon that would rather die than skip a security check is the most concise self-description it could leave behind.
The two quarantine strings also explain a quiet compatibility fact: preference plists are ordinary files, and ordinary files can arrive from the internet, inside a migrated home folder or a restored backup. The daemon treats everything it opens with the same suspicion the rest of the system applies to files of unknown provenance.
A write, a read and a delete, timed
This is the one thing this page did that was not read only. A throwaway domain was created, read two ways, and deleted, with the clock running. The domain name made its throwaway status explicit, the whole life of the experiment was ten seconds, and the leftover empty file it left behind, which turns out to be the interesting part, was removed afterwards.
17:09:23 defaults read com.example.prefsdTest
Error: Domain not found
17:09:23 defaults write com.example.prefsdTest Probe -int 42
17:09:23 the plist appears in ~/Library/Preferences, 54 bytes, same second
17:09:26 defaults read -> { Probe = 42; }
17:09:28 plutil -p on the file -> { "Probe" => 42 }
17:09:33 defaults delete com.example.prefsdTest
17:09:33 defaults read -> { } (an empty dictionary, not "not found")
17:09:35 the file is still there, rewritten to 42 bytes as an empty container
Two honest observations came out of it. On macOS 27 the write is effectively synchronous: the file existed in the same second as the command, so the folklore about the daemon sitting on writes for half a minute did not reproduce here, and this page will not claim it does.
The second observation did reproduce, and it is the one worth knowing: deleting a domain is not deleting a file. After the delete, the daemon answered reads with an empty dictionary, and the plist on disk was rewritten as an empty 42-byte container rather than removed. The uninstall guides that tell you to hunt down leftover plists are describing this exact behavior from the other side: apps come and go, their empty preference containers accumulate, and ~/Library/Preferences fills with the shells. On this Mac, 717 of them.
One hour of its logs
The single most surprising measurement in this series so far: cfprefsd is the busiest daemon yet measured, by a wide margin. One quiet hour, no installers, no first boot, no migration, just an ordinary afternoon:
| What the log lines say | Count in one hour |
|---|---|
| Total lines from all copies | 7,771 |
| Client connections activated | 1,144 |
| Client connections invalidated | 1,132 |
| Couldn’t open: no such file or directory | 5,459 |
| Distinct client process ids seen | 644 |
Compare distnoted, which produced 650 lines in its own quiet hour. cfprefsd produced twelve times that, at a rate of more than two lines every second, on a Mac doing nothing in particular. Six hundred and forty four distinct processes connected to it in sixty minutes. Among the clients still running when the census was taken: mdworker_shared, the Spotlight indexer; MTLCompilerService, Metal’s shader compiler; VTDecoderXPCService, video decoding; and SetStoreUpdateService, part of the model data machinery. Preference reads are not something apps do at startup. They do it constantly, all day, in the middle of everything else, and this daemon is the choke point every one of them passes through.
The largest single category, 70 per cent of everything it said, is also the strangest at first glance: five and a half thousand attempts to open preference files that do not exist. Apps routinely ask for domains that were never written on this machine, for features that have no settings yet, for keys that live somewhere else. The daemon logs every miss. A preferences daemon spends most of its life checking empty shelves, and writing it down.
Every client connection is logged under a peer name carrying the client’s process id, in lines like this one, verbatim:
activating connection: mach=false listener=false peer=true
name=com.apple.cfprefsd.daemon.peer[62746]
That pattern is the answer to every who-is-talking-to-it question, and it is what makes the daemon debuggable at all when something goes wrong.
The bouncer
Scattered through the same hour, a different kind of line, and the reason this daemon is more than a cache. These are verbatim:
rejecting read of CFPDSource (Domain: kCFPreferencesAnyApplication,
User: c{10}r, ByHost: Yes, Dirty: No) from process audioaccessoryd[1016]
because accessing these preferences requires user-preference-read
or file-read-data sandbox access
rejecting write of key(s) <private> in CFPDSource
(Domain: com.apple.messages.commsafety, ...) from process imagent[1097]
because setting these preferences requires user-preference-write
or file-write-data sandbox access
In one hour: 19 rejected reads, 16 of them from audioaccessoryd, an audio accessory helper trying to browse the global preferences domain its sandbox does not allow, and 17 rejected writes, 15 of them from imagent, the Messages helper, trying over and over to write a communications-safety key it is not permitted to touch, plus a couple from apsd, the push notification daemon.
Read those lines once more for what they establish. cfprefsd is not just reading and writing files on behalf of apps. It is the enforcement point for preference permissions: it knows which sandbox each client runs in, it knows which entitlements that sandbox grants, and it refuses to fetch or store values a perfectly running, Apple-signed system process asks for, purely because the rules say that process may not have them. CFPDSource in the log lines is the daemon’s own name for a preference source it is holding. The privacy redaction, the angle brackets around the key names, is applied by the logging system before anyone outside the process ever sees the line.
A Mac’s preferences are not protected by the file permissions on plists alone. They are protected by a daemon that checks who is asking, every single time.
What it costs
For all that traffic, the bill is small:
| Copy | User | Processor time over 26 days | Per day | Memory |
|---|---|---|---|---|
| daemon | root | 47:02 | about 1 min 48 s | 4.2 MB |
| agent | the user | 34:29 | about 1 min 19 s | 4.0 MB |
Both copies together cost about three minutes of processor time a day, roughly a fifth of one per cent of a single core, and a little over 8 MB of memory. The simulator copy, when a simulator is running, adds about 29 seconds a day of its own.
The agent’s open file table tells the architecture story in one look. It holds exactly zero preference files open. Not one of the 717 plists it fronts has a handle in it. The only file it holds beyond its own binary and the dynamic linker is a deleted one: a 77 KB plist cache under the diagnostics directory, unlinked from disk, the directory it lived in now empty, still held by the handle the daemon opened before whoever deleted it deleted it. Read, cache in memory, close. The files on disk are the durable copy; the working set lives inside the daemon.
That is also why the plist-carrying-your-settings mental model undersells the design. If you edit a plist file by hand while apps run, you are editing the durable copy of something whose live version may be sitting in a daemon’s memory, and the daemon’s view can win. The supported way in is the defaults command and the APIs above it, all of which go through the daemon and therefore never fight it.
The iPhone searches
The suggestion family for this name mixes in iphone and ios variants, and the answer is short. The preferences machinery is CoreFoundation and Foundation code, frameworks Apple ships across its platforms, so the same daemon name appears in crash and diagnostics lists on an iPhone, where it does the same job. Seeing it there means what it means on a Mac: the system was handling preferences at the moment that list was captured. It is not an app, it is not installed by anyone, and it is not a sign of anything wrong.
How to look at your own
Everything above came from commands any Mac can run:
ps -Ao pid,ppid,user,%cpu,rss,time,etime,args | grep [c]fprefsd
plutil -p /System/Library/LaunchAgents/com.apple.cfprefsd.xpc.agent.plist
plutil -p /System/Library/LaunchDaemons/com.apple.cfprefsd.xpc.daemon.plist
launchctl print user/501/com.apple.cfprefsd.xpc.agent
strings -a /usr/sbin/cfprefsd
lsof -p "$(pgrep -f 'cfprefsd agent')" | grep -c Preferences
log show --last 1h --predicate 'process CONTAINS "cfprefsd"' | wc -l
log show --last 1h --predicate 'eventMessage CONTAINS "rejecting"' --info | grep cfprefsd
Your counts will differ with your apps, and a higher line count than 7,771 is normal on a busier Mac. The two health checks worth running are the last two. A total that climbs hour over hour with no activity change points at a client, and the peer process ids in the connection lines name it. The rejecting lines, if any appear, are not faults in the daemon: they are the sandbox doing its job, and the process named in each line is the one to look at if the pattern bothers you.
Where window managers fit
This page is about plumbing, but it shares one conviction with everything else on this site: the best machinery on a Mac is the kind you never think about. A preferences daemon that fronts 717 files, answers 644 clients an hour and costs three minutes of processor time a day earns that description.
Ribbon, the window manager this site is about, applies the same instinct to windows. Instead of stacking and shrinking them, it lays every window full size on a single scrolling strip, so the one you want is a swipe away and nothing hides behind anything. It is $15, once, for up to 3 Macs, with a full refund within 10 days, and it runs on macOS 14 Sonoma and later on Apple silicon and Intel Macs. There is a browser demo of the strip if you want to feel it before installing anything.
The short version
cfprefsd is the preferences daemon: one small binary, started as a root daemon for the system and again as a background agent for your login session, which is why Activity Monitor shows two rows of it. Its manual page has been one honest sentence of description since October 2011, and the defaults command that everyone uses to touch preferences never mentions it at all.
Its job is to be the only thing that touches preference files: apps ask over XPC, it answers from a cache, it enforces sandbox permissions on every request, and it writes the plists back out. Measured for an hour it was the busiest daemon in this series, 644 clients and 7,771 log lines, 70 per cent of them looking for preference files that do not exist. Measured for 26 days it cost three minutes of processor time a day.
You cannot configure it, should not kill it, and have no reason to want either. If a cfprefsd row ever runs hot, the daemon is the wrong suspect: its own log names every client that connected, and the process id at the top of that table is your answer.
Questions
What is cfprefsd on Mac?
It is the preferences daemon, the server that backs the CFPreferences and NSUserDefaults APIs. When any app on a Mac reads or writes a setting, it does not open the plist file itself: it sends a message to cfprefsd, and the daemon looks the value up, hands it back, and writes changes out. The manual entry is one sentence of description, dated October 2011, and calls the daemon a defaults server. On the Mac measured here it fronts 717 preference files in the user Preferences folder alone, and both copies together cost about three minutes of processor time a day.
Why are there two or three cfprefsd processes in Activity Monitor?
Because macOS runs one copy per login session plus one system wide copy. There is an agent, running as you, for your login session, and a daemon, running as root, for the system: both are the same file, /usr/sbin/cfprefsd, started with the single argument agent or daemon. If you build iOS apps, each booted simulator runtime adds another copy from its own RuntimeRoot, which is how the count reaches three. This is the launchd design, not an infection: the agent job's own configuration says LimitLoadToSessionType Background and vends a service named com.apple.cfprefsd.agent, one per session.
What is com.apple.cfprefsd.xpc.daemon?
It is the launchd job label, and it answers the name people see in logs rather than in Activity Monitor. The system wide job is labeled com.apple.cfprefsd.xpc.daemon and runs as root, the per session job is labeled com.apple.cfprefsd.xpc.agent and runs as you, and each one vends a Mach service with a shorter name, com.apple.cfprefsd.daemon and com.apple.cfprefsd.agent. Apps connect over XPC to those service names, and the daemon logs every client under a peer name that ends in the client's process id, which is how you find out who has been talking to it.
Is cfprefsd a virus or malware?
No. It is Apple's own code on the sealed system volume at /usr/sbin/cfprefsd, about 200 KB, signed by the system authority, with a manual page that has shipped since 2011. The reason it draws searches is the same as for every name in this series: a lowercase process you never installed, doing work you were never told about. Apple's own Activity Monitor guide does not contain the word cfprefsd anywhere, so the app that lists the process offers no explanation for it, and the explanation has to come from pages like this one.
Why would cfprefsd use high CPU, and can I quit it?
Normally it barely works: about three minutes of processor time a day across both copies on the Mac measured here. When it runs hot, the cause is almost always a client, some app reading or writing preferences in a tight loop, and the daemon's own log names the process id of every client that connects, so the loop is findable. There is no supported way to disable it and nothing to tune: the manual says plainly there are no configuration options and users should not run it manually. Killing a copy buys seconds before the next connection restarts it, and any preference write still held in memory when it dies can be lost, which is the one way quitting it can actually hurt you.
Ready? Buy Ribbon for $15, or read all the guides.