SYNCER(4)

πŸ’– SYNCER(4) πŸ’–

okay bestie, gather round, because today we're talking about syncer β€” the file system synchronizer kernel process ✨ it's a whole kernel thing, not a command you type, so don't go looking for it in your $PATH babe, it's already living inside your kernel rent-free πŸ‘‘


🌸 SYNOPSIS 🌸

syncer

that's it. that's the whole synopsis. iconic minimalism honestly πŸ’…


✨ DESCRIPTION ✨

so the syncer kernel process is basically the responsible friend of the group chat 🫢 its whole job is protecting the integrity of disk volumes by flushing volatile cached file system data out to disk. like, it takes all that messy uncommitted data and actually writes it down so you don't lose it. no cap, it's doing the most for you and you don't even notice 😭

here's how it works: the kernel places all vnode(9)'s into a bunch of queues. the syncer process then works through those queues in a round-robin fashion, and usually it processes one queue per second. for every single vnode(9) sitting on the queue it's currently vibing with, syncer forces a write out to disk of its dirty buffers. periodt. πŸ’…

the usual delay between the moment buffers get dirtied and the moment they get synced? that's controlled by these sysctl(8) tunable variables, bestie:

  • kern.filedelay β€” default: 30 β€” time to delay syncing files πŸ“
  • kern.dirdelay β€” default: 29 β€” time to delay syncing directories πŸŽ€
  • kern.metadelay β€” default: 28 β€” time to delay syncing metadata πŸ¦‹

πŸ‘‘ SEE ALSO πŸ‘‘


🌈 HISTORY 🌈

the syncer process is a descendant of the β€˜update’ command, which first appeared in Version 6 AT&T UNIX, and was usually started by /etc/rc back when the system went multi-user. a kernel initiated β€˜update’ process? that first showed up in FreeBSD 2.0. so yeah, it's been the moment for literal decades πŸ’œ


πŸ’€ BUGS πŸ’€

okay so listen. it is possible on some systems that a sync(2) happening at the same time as a crash may cause file system damage. like, not ideal!! 😭 see fsck(8) if that ever happens to you bestie.

that's the whole page fr fr 🧚 hope this made sense and that your buffers stay squeaky clean ✨

sign-off vibes: this one's from Debian, dated July 14, 2000 πŸ’– mwah, go forth and sync responsibly πŸŽ€

πŸ“¦ where this page comes from