Suggest an editImprove this articleRefine the answer for “Why are I/O operations considered slow?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)I/O operations depend on physical devices or the network, not on the processor: disk or network work happens in milliseconds, while the CPU operates in nanoseconds - a difference of millions of times. **Key point:** that's exactly why Node.js uses non-blocking asynchronous I/O - so the thread doesn't sit idle while the disk or network "thinks".Shown above the full answer for quick recall.Answer (EN)Image**I/O operations are considered "slow"** because they **depend on external devices or networks**, not on the processor. "Slow" here means slow **compared to operations in RAM or the CPU**. ## 1. What happens during I/O When a program, say, reads a file: 1. The **processor** hands the operating system a request: "read data from disk". 2. The OS passes the task to a **device driver**. 3. The **physical disk** (SSD or HDD) has to: - locate the right sector, - read the data, - pass it back through the system bus into memory. 4. Only then does the program get the result. This can take **milliseconds**, which for the CPU is **an eternity** (since the processor operates in nanoseconds). ## 2. Typical examples of "slow" I/O | I/O type | Average latency | Why it's slow | |---|---|---| | **Disk (HDD/SSD)** | milliseconds | physically reading data off the media | | **Network (HTTP, TCP)** | milliseconds → seconds | waiting for network transfer, a server response | | **Database** | milliseconds | network delays + running the query on the database side | | **Filesystem** | milliseconds | talking to the OS, accessing file descriptors | ## 3. Comparison with CPU and memory | Operation type | Time (roughly) | |---|---| | CPU (arithmetic, memory) | nanoseconds (10⁻⁹ s) | | RAM operations | tens of nanoseconds | | An SSD | hundreds of microseconds → milliseconds | | An HTTP request | milliseconds → hundreds of milliseconds | That's a difference of **millions of times** between computing in memory and reading from disk/network. ## 4. Why this matters in Node.js Node.js is **single-threaded**. If I/O operations ran **synchronously (blocking)**, then: - the thread would be **stuck waiting** on the disk or network; - other requests would **hang** until the operation finished. That's why Node.js uses **non-blocking asynchronous I/O**, operations run in the background, and once ready, they trigger a **callback** (through the Event Loop). ## Summary > **I/O operations are considered slow** because they require interacting with external devices or networks, where delays (milliseconds) are orders of magnitude larger than in-memory operations (nanoseconds). > Node.js solves this with **asynchronous, non-blocking I/O**, so it never sits idle while waiting.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.