Thrum

What is sourcekit-lsp, and why is it using CPU on my Mac?

Last reviewed: 19 November 2026. Path checked with Xcode 26.6 on macOS 26.3.1.

sourcekit-lsp is the Language Server Protocol server for Swift and C-based languages, started by editors such as Visual Studio Code or Cursor with the Swift extension to get code completion, errors and jump-to-definition. It is busy while it builds an index of your project, resolves packages or type-checks the file you are editing. Its parent process tells you which editor started it.

sourcekit-lsp at a glance

sourcekit-lsp
Made byApple and the Swift project (open source)
TypeLanguage server (command-line tool)
Location/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp
Runs asyour user
Can you quit it?Yes. The editor that started it loses Swift completion until it restarts the language server.

What is sourcekit-lsp?

The Language Server Protocol lets one language engine serve many editors. SourceKit-LSP is the Swift project's implementation; its README says it is built on sourcekitd (for Swift) and clangd (for C, C++ and Objective-C), supports Swift Package Manager projects and projects that provide a compile_commands.json, and is included in swift.org toolchains and bundled with Xcode.

Xcode does not use sourcekit-lsp itself. When you see it in Activity Monitor, another program started it: an editor, an AI coding tool or a plugin that wants Swift language features.

Is sourcekit-lsp safe?

Yes, when it runs from an Xcode or swift.org toolchain folder. It reads the source files of the project its editor has open.

Why does sourcekit-lsp use so much CPU and memory?

How much CPU is normal for sourcekit-lsp?

High CPU right after an editor opens a project, then near 0% while idle, is the usual pattern.

One sourcekit-lsp per open editor workspace is expected.

How do you find what started sourcekit-lsp and calm it down?

  1. Find its parent. Run ps -o ppid= -p <PID> with the PID from Activity Monitor, then ps -o comm= -p <PPID> to see which editor or tool started it.
  2. Build once. Run swift build in the package folder, or build in Xcode. The index then has the build output it needs, and the server does less work on its own.
  3. Close duplicate workspaces. Close editor windows open on the same project, or quit the tool that started an extra server.
  4. Restart the server. Quit sourcekit-lsp in Activity Monitor. The editor starts a fresh one, which clears a stuck request.

When should you worry about sourcekit-lsp?

Constant high CPU with nothing changing in the project, or repeated crashes, usually mean a build configuration it cannot read. Check the editor's output panel for SourceKit-LSP messages.

A sourcekit-lsp running from an unexpected folder should be checked with codesign -dv.

How do you check sourcekit-lsp in Activity Monitor and Terminal?

Open Activity Monitor (Applications > Utilities), and type sourcekit-lsp in the search field. The CPU tab shows its % CPU. The Memory tab shows its Memory. Double-click the row for its parent process, memory details and open files.

In Terminal, the first command lists every sourcekit-lsp process with its PID, user, CPU and memory (RSS is resident memory in kilobytes).

ps -axo pid,user,%cpu,%mem,rss,command | grep -F 'sourcekit-lsp' | grep -v grep

How can Thrum help with sourcekit-lsp?

Thrum keeps a live CPU graph in the menu bar. One click shows the eight processes using the most CPU, so you can see when sourcekit-lsp is among them and how much it takes. An optional alert tells you when a process stays above a CPU level you choose (50 to 200% of one core) for 1 to 10 minutes. Click sourcekit-lsp in the list for its PID, threads and memory, and Quit or Force Quit it after a confirmation.

Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.

Questions about sourcekit-lsp

What is the difference between sourcekit-lsp and SourceKitService?

SourceKitService is the XPC service that does Swift analysis. sourcekit-lsp is a language server built on top of it, which translates that into the protocol editors such as VS Code understand.

Why is sourcekit-lsp running when I am not using Swift?

A tool or extension started it, for example a language-aware plugin in your editor or an AI coding tool. Its parent process shows which one.

Sources