swift automated tiering (openstacksummit austin)
TRANSCRIPT
Copyright©2016 NTT corp. All Rights Reserved.
Swift Automated Tiering
Kazuhiro MIYAHARA [IRC: m_kazuhiro] [email protected] NTT Software Innovation Center
Copyright(c)2009-2016 NTT CORPORATION. All Rights Reserved.
2 Copyright©2016 NTT corp. All Rights Reserved.
Today’s Goal
• Discuss and get agreement on how to determine tiers which objects are moved to for our “Automated-Tiering” implementation.
• This slide will show you overview of our implementation.
• Implementation:https://review.openstack.org/#/c /287057/
• Hackathon slide: http://www.slideshare.net/miyaharakazuhiro/swift-automated-tiering-swift-hackathon-bristol
Agenda
• Background
• Changes of Swift
• Components of Our Proposal
• Overview of Deliverer
• Overview of Addresser
• Addressing Rule
• Addresser & Deliverer Image
• Demo
• Discussion
Today’s Goal & Agenda
3 Copyright©2016 NTT corp. All Rights Reserved.
Our Use Case
Contents (e.g. movies, pictures, music) providing service.
In this service, new contents are requested frequently and gradually becoming less frequently requested.
Our Requirement
Store frequently requested objects into replication policy containers for performance and infrequently requested objects into erasure coding policy containers for capacity efficiency.
Background
4 Copyright©2016 NTT corp. All Rights Reserved.
• Objects move among some different storage policy containers automatically.
• Swift ensures users’ transparent accesses to the automatically moved objects.
Changes of Swift
“/a/c”
policy index : 0 policy name : gold
“/a/c_bronze”
policy index : 2 policy name : bronze
“/a/c_silver”
policy index : 1 policy name : silver
“/a/c_bronze/o3”
DATA Z
“/a/c_silver/o2”
DATA Y
Object
Container
Link object
(SLO)
“/a/c/o2”
Link to “/a/c_silver/o2” “/a/c/o1”
DATA X
“/a/c/o3”
Link to “/a/c_bronze/o3”
5 Copyright©2016 NTT corp. All Rights Reserved.
Addresser
• Determine suitable policy of each object.
Deliverer
• Move objects to the suitable policy container.
Delivery Task Object
• Information from addressers to deliverers.
• Includes an path “/a/c /o” and a storage policy index “N”.
• “N” is the suitable policy for “/a/c /o”.
Components of Our Proposal
deliverer
“/.delivery_task”
GET
delivery task objects
Account
Object
Container
…
…
…
…
addresser
PUT
6 Copyright©2016 NTT corp. All Rights Reserved.
Overview of Deliverer
• Move objects to suitable storage policy containers.
• PUT link object to the original object path to ensure users’ transparent accesses.
state: gold “/a/c”
policy index : 0
policy name : gold
“/a/c/o”
DATA X
Object
Container
Link object
(SLO)
state: silver “/a/c”
policy index : 0
policy name : gold
“/a/c/o”
Link to “/a/c_silver/o”
“/a/c_bronze”
policy index : 2
policy name : bronze
state: bronze “/a/c”
policy index : 0
policy name : gold
“/a/c_bronze/o”
DATA X
“/a/c/o”
Link to “/a/c_bronze/o”
“/a/c_silver”
policy index : 1
policy name : silver
“/a/c_silver/o”
DATA X
“/a/c_siilver”
policy index : 1
policy name : silver
“/a/c_bronze”
policy index : 2
policy name : bronze
“/a/c_siilver”
policy index : 1
policy name : silver
“/a/c_bronze”
policy index : 2
policy name : bronze
7 Copyright©2016 NTT corp. All Rights Reserved.
• Run on storage nodes (as well as object-replicator).
• Search their local node for objects.
• Determines suitable policy of each local object basing on “AddressingRule” instances.
• PUT delivery task objects of the suitable policy indices.
NOTE: I will talk about “AddressingRule” on following pages.
Overview of Addresser
object- addresser
object-server
node
addressing rule 1
addressing rule 2
addressing rule N
…
for addressing_rule in addressing_rules:
for local_object in local_objects:
suitable_policy =
addressing_rule.determine_address(local_object)
put_delivery_task(local_object, suitable_policy)
addresser’s pseudo code image
8 Copyright©2016 NTT corp. All Rights Reserved.
AddressingRule instances decide the following 3 items.
A) [Input]:Addressing target containers
B) [function]:Policy determining method
C) [Output]:Suitable policy for each object
Config option of AddressingRule:
• Original policy name:
The target container policy of addressing.
• Derivative policy names:
The candidates for the suitable policy
other than the original policy.
• AddressingRule subclass path:
Class which has methods for determining policies.
• AddressingRule subclass constructor parameters:
Parameters for the AddressingRule subclass constructor.
The parameter names and types are depends on the AddressingRule subclass.
AddressingRule (1/2)
decides (A)
decides (C)
decides (B)
9 Copyright©2016 NTT corp. All Rights Reserved.
Users can define some AddressingRule at object-server.conf
AddressingRule (2/2)
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
original policy name
derivative policy names
AddressingRule subclass path
(The ElapsedTimeAddressingRule determines the suitable policies by
comparing thresholds with objects’ elapsed time from the last modified times)
AddressingRule subclass constructor parameters
(The ElapsedTimeAddressingRule requires an integer list parameter “thresholds”)
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
10 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (1/7)
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c/o3”
last modified: “00:00:40”
DATA Z
“/a/c/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO)
“/a/c/o1”
last modified: “00:00:00”
DATA X
Current time
“00:00:50”
11 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (2/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c/o3”
last modified: “00:00:40”
DATA Z
“/a/c/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO) “/a/c_silver/o1”
last modified: “00:00:00”
DATA X Current time
“00:01:10”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_silver/o1”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
12 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (3/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c/o3”
last modified: “00:00:40”
DATA Z
“/a/c_silver/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO) “/a/c_silver/o1”
last modified: “00:00:00”
DATA X Current time
“00:01:30”
“/a/c/o2”
last modified: “00:00:20”
Link to “/a/c_silver/o2”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_silver/o1”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
13 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (4/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c_silver/o3”
last modified: “00:00:40”
DATA Z
“/a/c_silver/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO) “/a/c_silver/o1”
last modified: “00:00:00”
DATA X Current time
“00:01:50”
“/a/c/o3”
last modified: “00:00:40”
Link to “/a/c_silver/o3”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_silver/o1”
“/a/c/o2”
last modified: “00:00:20”
Link to “/a/c_silver/o2”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
14 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (5/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c_silver/o3”
last modified: “00:00:40”
DATA Z
“/a/c_silver/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO)
“/a/c_bronze/o1”
last modified: “00:00:00”
DATA X
Current time
“00:02:10”
“/a/c/o3”
last modified: “00:00:40”
Link to “/a/c_silver/o3”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_bronze/o1”
“/a/c/o2”
last modified: “00:00:20”
Link to “/a/c_silver/o2”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
15 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (6/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c_silver/o3”
last modified: “00:00:40”
DATA Z
“/a/c_bronze/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO)
“/a/c_bronze/o1”
last modified: “00:00:00”
DATA X
Current time
“00:02:30”
“/a/c/o3”
last modified: “00:00:40”
Link to “/a/c_silver/o3”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_bronze/o1”
“/a/c/o2”
last modified: “00:00:20”
Link to “/a/c_bronze/o2”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
16 Copyright©2016 NTT corp. All Rights Reserved.
Addresser & Deliverer Image (7/7)
“/a/c” policy index : 0 policy name : gold
“/a/c_bronze” policy index : 2 policy name : bronze
“/a/c_silver” policy index : 1 policy name : silver
“/a/c_bronze/o3”
last modified: “00:00:40”
DATA Z
“/a/c_bronze/o2”
last modified: “00:00:20”
DATA Y
Object
Container
Link object
(SLO)
“/a/c_bronze/o1”
last modified: “00:00:00”
DATA X
Current time
“00:02:50”
“/a/c/o3”
last modified: “00:00:40”
Link to “/a/c_bronze/o3”
“/a/c/o1”
last modified: “00:00:00”
Link to “/a/c_bronze/o1”
“/a/c/o2”
last modified: “00:00:20”
Link to “/a/c_bronze/o2”
[addressing-rule:elapsed_time]
addressing_rule_class = swift.obj.addresser.ElapsedTimeAddressingRule
original_policy = gold
derivative_policies = silver, bronze
thresholds = 60, 120
This rule determines suitable policy as follows:
elapsed time < 60[sec] : gold
60[sec] <= elapsed time < 120[sec] : silver
120[sec] <= elapsed time : bronze
17 Copyright©2016 NTT corp. All Rights Reserved.
[Environment]
• SAIO runs on my machine.
• There are 3 storage policies, gold and silver and bronze.
• Addresser and Deliverer running
Rule:
CASE1 elapsed time < 60[sec] : gold
CASE2 60[sec] <= elapsed time < 120[sec] : silver
CASE3 120[sec] <= elapsed time : bronze
[Scenario]
1. Show settings of policies, addresser, and deliverer
2. PUT an object in gold policy container.
3. Confirm the object is in gold policy in CASE1.
4. Confirm the object is in silver policy in CASE2.
5. Confirm the object is in bronze policy in CASE3.
Demo
18 Copyright©2016 NTT corp. All Rights Reserved.
Usability
• Easy to use?
Addressing rule’s config
• More flexible?
• More simple?
Other questions
Discussion
19 Copyright©2016 NTT corp. All Rights Reserved.
Handle update/delete by users
• PUT to Link objects with new data.
• DELETE Link objects.
• POST to Link objects.
Cooperation with other functions
• Versioning
• Container/Account Quota
• SLO/DLO
Next Tasks