Accessing DRAM & NVMe SSDs in the Cloud
Both DRAM and local NVMe SSDs on a cloud VM are direct physical hardware resources accessed using standard operating system memory and filesystem operations — no cloud APIs or SDKs are used to access them.
How Your Code Accesses Each Tier
DRAM (System Memory)
- What it is: The physical RAM modules plugged directly into the host machine's motherboard next to the CPU.
- How you access it: Directly via standard code memory allocation. When you declare a variable, allocate an array, or create a memory buffer (
malloc()in C/C++,Vecin Rust, orBuffer.alloc()in Node.js), the operating system's CPU Memory Management Unit (MMU) handles it instantly at hardware speeds.
Local NVMe SSDs (Instance Store)
- What it is: Physical high-speed flash drives physically wired to the host hypervisor server.
- How you access it: Like any local hard drive on a PC. When your instance boots, Linux formats the drive (e.g.
/dev/nvme1n1) and mounts it as a local folder (such as/mnt/nvme0or/data). You read and write to it using native filesystem APIs (node:fs,pread(),pwrite(), or direct I/O calls).
When Do You Actually Use a Cloud API?
Cloud SDKs/APIs (like @aws-sdk/client-s3, boto3, or the GCP/Azure SDKs) are only used when communicating over the network to external cloud services, such as Amazon S3 object storage:
- DRAM (Local RAM): Standard language memory (
malloc,Buffer) - NVMe SSD (Local Drive): Standard OS filesystem (
fs.open,pread,pwrite) - S3 (Network Storage): AWS SDK / HTTP REST API requests (
Range: bytes=...)
Cost: Bundled, Not Metered
Cloud providers do not charge for DRAM or local NVMe SSDs based on reads, writes, or I/O operations. Because they are physical hardware attached directly to the host server, providers bundle them into a flat hourly (or per-second) price for the VM instance (using AWS as an example below — GCP and Azure work the same way).
DRAM & Local NVMe SSDs (Instance Pricing)
- Billing Model: Flat hourly / per-second instance rate. You pay for the VM as long as it is in the
Runningstate (e.g., /hour for an AWSi4i.xlargeinstance). - Read/Write Costs: Zero. Whether you perform 0 reads/writes or max out the NVMe SSD at 1,000,000 I/O operations per second, your bill remains exactly the same.
- Storage Capacity Costs: Nothing extra. The RAM and local NVMe storage capacity are included in the instance fee.
How This Compares to S3 Object Storage & EBS
AWS does charge based on reads, writes, and operations for cloud storage services that run over the network:
- Amazon S3 (Object Storage): Charges for both data volume (/GB/month) and API operations (
GET,PUT, byte-range requests, andLISTcalls incur per-request fees). - AWS EBS (Network-Attached Disks): Charges a monthly rate for provisioned gigabytes (/GB/month) plus optional fees for provisioned IOPS.
Summary Comparison
| Storage Tier | AWS Billing Metric | Read / Write Request Fees? |
|---|---|---|
| DRAM | Bundled in VM hourly rate | None ($0) |
| Local NVMe SSD | Bundled in VM hourly rate | None ($0) |
| Amazon S3 | Per GB stored/month + API requests | Yes (charged per GET/PUT call) |
How Access Works in GCP and Azure
The same principle applies across all major cloud providers: local DRAM and NVMe hardware are accessed via the OS, never via provider APIs — and their cost is bundled into the flat VM rate.
Google Cloud Platform (GCP)
- Local SSDs are NVMe flash drives attached directly to the host machine, available on compute-optimized and general-purpose VMs (e.g.,
C2,C3,N2). Linux exposes them as devices (e.g./dev/nvme0n1) that you format and mount yourself (e.g.,/mnt/disks/local-ssd). - Like AWS instance stores, GCP Local SSDs are ephemeral — data survives a live migration but is lost if the VM stops.
- RAM and Local SSDs are billed as part of the flat per-second VM price. Google Cloud Storage (GCS), the S3 equivalent, is the tier billed per GB and per API operation.
Microsoft Azure
- L-series VMs (e.g.,
Lsv2,Lsv3) attach local NVMe disks directly to the host server. On Linux they appear as standard NVMe devices (e.g./dev/nvme0n1) that you format and mount; many other VM sizes also include a local temp disk. - They are ephemeral — the disks are wiped on VM deallocation — and Azure explicitly markets them for local, low-latency scratch/cache storage.
- RAM and local NVMe capacity are included in the flat hourly VM price. Azure Blob Storage is the network tier billed per GB and per transaction.
Related reads
- DRAM — deep dive on the top tier
- NVMe SSDs — deep dive on the ephemeral flash tier
- S3 Data Fetching Techniques — the network tier where SDKs are required