openstack swift的性能调优

Post on 16-Apr-2017

151 Views

Category:

Internet

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

P e r f o r m a n c e Tu n i n g o f O p e n S t a c k S w i f t

李明宇 奥思数据 创始⼈人& CTO

Email: li.mingyu@ostorage.com.cn

O p e n S t a c k S w i f t的性能调优

Content

• What is object storage and the object storage APIs? • OpenStack Swift • How to improve the performance of Swift in different

scenarios Basic scenario Large objects Multiple regions Access the data with filesystem APIs

• Will erasure coding degrade or improve the performance of Swift?

Object Storage S3-like Storage

Data are stored in bucketscontainers Flat Namespace

RESTful API

OpenStack Swift• An open source

object storage system.

• One of the first two projects

of OpenStack.

• Very high durability.

• Very high scalability.

• Very high availability.

• Global distributed

(multi-region) cluster.

OpenStack Swift• Users of Swift

The architecture of a Swift cluster

The architecture of a Swift cluster

图引⾃自Intel

OStorage An Object Storage Company

Speed is funSpeed is fun

图引⾃自Intel

How many proxy severs we need to reach the maximum throughput ?

Large objects

• Swift is good at storing small objects like photos and documents.

Large objects

• Swift is good at storing small objects like photos and documents.

• How about large objects?

11

• Large object support APIs

12

Large objects

swift upload test_container -S 1073741824 large_fileswift download test_container large_file# First, upload the segmentscurl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000001 --data-binary '1'curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000002 --data-binary '2'curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000003 --data-binary '3'

# Next, create the manifest filecurl -X PUT -H 'X-Auth-Token: <token>' -H 'X-Object-Manifest: container/myobject/' http://<storage_url>/container/myobject --data-binary ''

# And now we can download the segments as a single objectcurl -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject

Zone 1 Zone 2 ……Zone 3 Zone 1 Zone 2 ……Zone 3

Replication Network

Region 1 Region 2

Multiple Regions

13

[app:proxy-server] write_affinity = r1

[app:proxy-server] …… read_affinity = r1=100

Multiple Regions Experiment

14

15

Multiple Regions Experimental Results

• Writes

16

Multiple Regions Experimental Results

• Reads

17

Zone 1 Zone 2 ……Zone 3 Zone 1 Zone 2 ……Zone 3

Replication Network

Region 1 Region 2

Be careful with the Eventually Consistency!

Only object PUT requests are affected by the write_affinity setting.

Multiple Regions

Access the data with filesystem APIs

18

Proxy FS Proxy

Swift Object Server

File Object

Access the data with filesystem APIs

In Go language

Erasure Coding in Swift

20

21

Erasure Coding in Swift

Erasure codes encode/decode at the proxy servers

EC audit and reconstruct at the object server

22

Erasure Coding in Swift

Erasure codes encode/decode at the proxy servers

EC audit and reconstruct at the object server

23

Erasure Coding in Swift

How many proxy severs we need to reach the maximum throughput

when using EC?

Erasure Coding in Swift

Erasure Coding in Swift

• Compared with replicas … • EC is more suitable for large objects. It

can reach the maximum throughput with less network bandwidth cost.

• But for small objects, the performance will degrade when using EC due to heavier IO cost.

26

Erasure Coding in Swift Conclusion

27

Questions ?

top related