What does AWS EBS "block" mean?

Viewed 163

From: EBS vs EFS vs S3 - When to Use AWS’ Three Storage Solutions:

"EBS is a block storage service, which means all data within EBS is stored in equally sized blocks."

What does this mean? Here block means file block in traditional sense or AWS specific blocks? What if I have 1GB data + 500MB data. Are they stored in same sized blocks?

2 Answers

What does this mean? Here block means file block in traditional sense or AWS specific blocks?

Yes these are typical block based storage ( other examples are file based storage or object based storage - check out common differences here). The on-prem block based storage solutions are very much similar to the ones in Cloud in terms of technology. In general Block storage stores files in multiple volumes called blocks and the block storage devices are more flexible and offer higher performance than regular file storage. Quoting from here

Block storage is often configured to decouple the data from the user’s environment and spread it across multiple environments that can better serve the data. And then, when data is requested, the underlying storage software reassembles the blocks of data from these environments and presents them back to the user. It is usually deployed in storage-area network (SAN) environments and must be tied to a functioning server.

So AWS EBS is block storage service provided by AWS and it underlying uses blocks. I think it does not tell what block size it uses but I guess it depends upon the type and size of volume. However there is a thing called logical data block for which the data block sizes are mentioned here. But remember these are not the actual data block but just a mapping from OS to the attached volume which is eventually stored physically on a distributed system in equal sized blocks which are kind of internal details of EBS system ( which is acting like a typical SAN)

From this page:

To an operating system installed on an EC2 instance, an attached EBS volume appears to be a physical hard disk drive containing 512-byte disk sectors. The OS manages the allocation of data blocks (or clusters) onto those virtual sectors through its storage management utilities

and, further down:

The industry default size for logical data blocks is currently 4,096 bytes (4 KiB). Because certain workloads benefit from a smaller or larger block size, file systems support non-default block sizes that can be specified during formatting.

So how you create the file system determines the logical block size. Under Linux, ext4 uses 4096 bytes by default but it can be modified (smaller). Other O/S's might use different sizes and methods. But the underlying physical device uses 512 bytes.

Related