1

From http://en.wikipedia.org/wiki/Page_%28computer_memory%29

A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described by a single entry in the page table. It is the smallest unit of data for memory allocation performed by the operating system on behalf of a program, and for transfers between the main memory and any other auxiliary store, such as a hard disk drive.

From http://en.wikipedia.org/wiki/Data_cluster

In computer file systems, a cluster or allocation unit is a unit of disk space allocation for files and directories. To reduce the overhead of managing on-disk data structures, the filesystem does not allocate individual disk sectors by default, but contiguous groups of sectors, called clusters.

I wonder if the size of a memory page and the size of a file system cluster in the same computer system (hardware and OS, in particular Linux) are always the same?

2 Answers 2

4

No, they are not necessarily the same. Back in the days of sub 100 mb disk drives, linux filesystems typically only used 1 KiB clusters. These days 4KiB is the norm because the larger sizes have less overhead. The system page size is 4 KiB on x86 ( including 64 bit ) processors. Some ARM based systems use a 64 KiB page size. FAT16 filesystems use up to 64 KiB clusters.

1

No, the page size and the cluster size are not necessarily the same.

  • The Wikipedia page on memory pages you are citing already lists that the same computer architecture can switch between different page sizes. For example, x86_64 may have page sizes of 4KiB, 2MiB, or 1GiB (depending on OS support, work load, etc.).
  • The cluster size depends on the physical storage medium. Again, your Wikipedia article on data clusters already mentions varying sizes. Using SSDs, you don't have clusters in a traditional sense.
3
  • Cluster size has nothing to do with the physical storage medium and an SSD is treated no differently than an HDD in that regard.
    – psusi
    Commented Jan 1, 2015 at 22:25
  • @psusi: True. Modern drives (both HDDs and SSDs) may hide their physical properties and pretends being of a different configuration.
    – f15h
    Commented Jan 1, 2015 at 22:30
  • If by "physical properties" you mean their internal geometry, that has nothing to do with the filesystem cluster size, even back when when geometry actually meant something.
    – psusi
    Commented Jan 1, 2015 at 22:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .