]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Update architecture.rst:Calculating PG IDs 1855/head
authorKai Zhang <zakir.exe@gmail.com>
Fri, 23 May 2014 00:37:16 +0000 (17:37 -0700)
committerKai Zhang <zakir.exe@gmail.com>
Fri, 23 May 2014 00:37:16 +0000 (17:37 -0700)
To Calculate PG ID, if I didn't get it wrong, CRUSH calculates the hash modulo
the number of PGs instead of OSDs, according to osd/osd_types.cc:963
ceph_stable_mod(pg.ps(), pg_num, pg_num_mask).

Signed-off-by: Kai Zhang <zakir.exe@gmail.com>
doc/architecture.rst

index 55fd83b547e828a2f43b37ed5a3d87c4ec2024b3..488cbca26ed05cee241e51ba2401ef7758d9bd49 100644 (file)
@@ -387,13 +387,13 @@ The only input required by the client is the object ID and the pool.
 It's simple: Ceph stores data in named pools (e.g., "liverpool"). When a client
 wants to store a named object (e.g., "john," "paul," "george," "ringo", etc.)
 it calculates a placement group using the object name, a hash code, the
-number of OSDs in the cluster and the pool name. Ceph clients use the following
+number of PGs in the pool and the pool name. Ceph clients use the following
 steps to compute PG IDs.
 
 #. The client inputs the pool ID and the object ID. (e.g., pool = "liverpool" 
    and object-id = "john")
 #. CRUSH takes the object ID and hashes it.
-#. CRUSH calculates the hash modulo the number of OSDs. (e.g., ``0x58``) to get 
+#. CRUSH calculates the hash modulo the number of PGs. (e.g., ``0x58``) to get 
    a PG ID.
 #. CRUSH gets the pool ID given the pool name (e.g., "liverpool" = ``4``)
 #. CRUSH prepends the pool ID to the PG ID (e.g., ``4.0x58``).
@@ -1450,4 +1450,4 @@ instance for high availability.
 .. _RESTful: http://en.wikipedia.org/wiki/RESTful
 .. _Erasure Code Notes: https://github.com/ceph/ceph/blob/40059e12af88267d0da67d8fd8d9cd81244d8f93/doc/dev/osd_internals/erasure_coding/developer_notes.rst
 .. _Cache Tiering: ../rados/operations/cache-tiering
-.. _Set Pool Values: ../rados/operations/pools#set-pool-values
\ No newline at end of file
+.. _Set Pool Values: ../rados/operations/pools#set-pool-values