3.1 phân cấp cụm sao bản đồ Bản đồ của cụm bao gồm thiết bị và các nhóm, cả hai đều có số định danh và các giá trị trọng lượng liên kết với chúng. Thùng có thể chứa bất kỳ số lượng các thiết bị hoặc nhóm khác, cho phép chúng để tạo thành các nút bên trong một hệ thống lưu trữ trong đó thiết luôn lúc lá. Thiết bị lưu trữ được gán trọng bởi các quản trị viên để kiểm soát số lượng tương đối của dữ liệu họ có trách nhiệm lưu trữ. Mặc dù một hệ thống lớn có khả năng sẽ bao gồm các thiết bị với một loạt các khả năng và hiệu suất đặc điểm, phân phối ngẫu nhiên dữ liệu thống kê tương quan thiết bị sử dụng với khối lượng công việc, như vậy mà thiết bị tải là trung bình tỷ lệ thuận với số lượng dữ liệu được lưu trữ. Kết quả là một thước đo hết vị trí, trọng lượng, nên được bắt nguồn từ khả năng của thiết bị. Trọng lượng thùng được định nghĩa là tổng trọng lượng các mặt hàng chúng chứa. Nhóm có thể bao gồm tùy tiện để xây dựng một hệ thống phân cấp đại diện cho lí có sẵn. Ví dụ, một trong những có thể tạo bản đồ cụm với "kệ" Xô ở mức thấp nhất để đại diện cho bộ thiết bị giống hệt như chúng được cài đặt, và sau đó kết hợp kệ thành "nội" nhóm nhóm với nhau các kệ được cài đặt trong cùng một rack. Tủ có thể được nhóm lại thêm vào "hàng" hoặc "phòng" Xô cho một hệ thống lớn. Dữ liệu được đặt trong hệ thống phân cấp của đệ quy cách chọn mục lồng nhau Xô qua một hàm băm-giống như giả ngẫu nhiên. Trái ngược với kỹ thuật hashing thông thường, trong đó có bất kỳ thay đổi nào trong số các mục tiêu thùng (thiết bị) kết quả trong một lớn reshuffling của các nội dung rác, CRUSH được dựa trên bốn loại thùng khác nhau, mỗi với một thuật toán khác nhau lựa chọn để di chuyển dữ liệu địa chỉ do bổ sung hoặc loại bỏ các thiết bị và độ phức tạp tính toán tổng thể3.2 vị trí đặt bản sao CRUSH is designed to distribute data uniformly among weighted devices to maintain a statistically balanced utilization of storage and device bandwidth resources. The placement of replicas on storage devices in the hierarchy can also have a critical effect on data safety. By reflecting the underlying physical organization of the installation, CRUSH can model—and thereby address—potential sources of correlated device failures. Typical sources include physical proximity, a shared power source, and a shared network. By encoding this information into the cluster map, CRUSH placement policies can separate object replicas across different failure domains while still maintaining the desired distribution. For example, to address the possibility of concurrent failures, it may be desirable to ensure that data replicas are on devices in different shelves, racks, power supplies, controllers, and/or physical locations. In order to accommodate the wide variety of scenarios in which CRUSH might be used, both in terms of data replication strategies and underlying hardware configurations, CRUSH defines placement rules for each replication strategy or distribution policy employed that allow the storage system or administrator to specify exactly how object replicas are placed. For example, one might have a rule selecting a pair of targets for 2-way mirroring, one for selecting three targets in two different data centers for 3-way mirroring, one for RAID-4 over six storage devices, and so on . Each rule consists of a sequence of operations applied to the hierarchy in a simple execution environment, presented as pseudocode in Algorithm 1. The integer input to the CRUSH function, x, is typically an object name or other identifier, such as an identifier for a group of objects whose replicas will be placed on the same devices. The take(a) operation selects an item (typically a bucket) within the storage hierarchy and assigns it to the vector~i, which serves as an input to subsequent operations. The select(n,t) operation iterates over each element i ∈~i, and chooses n distinct items of type t in the subtree rooted at that point. Storage devices have a known, fixed type, and each bucket in the system has a type field that is used to distinguish between classes of buckets (e. g., those representing “rows” and those representing “cabinets”). For each i ∈~i, the select(n,t) call iterates over the r ∈ 1,...,n items requested and recursively descends through any intermediate buckets, pseudo-randomly selecting a nested item in each bucket using the function c(r,x) (defined for each kind of bucket in Section 3.4), until it finds an item of the requested type t. The resulting n|~i| distinct items are placed back into the input~i and either form the input for a subsequent select(n,t) or are moved into the result vector with an emit operation. As an example, the rule defined in Table 1 begins at the root of the hierarchy in Figure 1 and with the first select(1,row) chooses a single bucket of type “row” (it selects row2).
đang được dịch, vui lòng đợi..
