April 2013
Considerations	
  for	
  Building	
  
a	
  Private	
  Cloud
Folsom	
  Update
	
  
Ryan	
  Richard,	
  RHCA
OpenStack	
  Architect	
  -­‐	
  Private	
  Cloud
ryan.richard@rackspace.com
@rackninja
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Why	
  Folsom?
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What	
  is	
  a	
  Private	
  Cloud?
Elastic	
  or	
  Traditional	
  Virtualization	
  (hint:	
  Pick	
  One!)
Multi-­‐tenant	
  (Multi-­‐Application)
Size
Private	
  API	
  endpoints
Limited	
  inbound	
  connectivity
Customized	
  for	
  specific	
  workloads
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
	
  #	
  of	
  instances	
  on	
  this	
  physical	
  host?
Flavor: m1.tiny
Ram: 512MiB
vCPU: 1
Disk: 0 (size of image)
Total instances:
?
48
vCPU Ram Disk
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
	
  #	
  of	
  instances	
  on	
  this	
  physical	
  host?
Flavor: m1.medium
Ram: 4096MiB
vCPU: 2
Disk: 10GiB + 40GiB
Total instances:
24
vCPU Ram Disk
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
	
  #	
  of	
  instances	
  on	
  this	
  physical	
  host?
Flavor: ram heavy
Ram: 64GiB
vCPU: 8
Disk: 100GiB
Total instances:
2
vCPU Ram Disk
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Capacity	
  Thoughts
Don’t allow disk size of 0
Public Cloud: Limit flavors to image size
Private Cloud: Can add flavors for specific
application profiles
Network Utilization
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Capacity	
  Thoughts
I can always add more machines....
But you can’t change or modify the fixed
network once instances are running
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Capacity	
  Thoughts
(resource	
  /	
  resource	
  in	
  smallest	
  flavor)	
  =	
  maximum	
  #	
  of	
  
instances	
  per	
  machine
Fixed	
  Network	
  -­‐	
  Double	
  or	
  quadruple	
  number	
  of	
  expected	
  
instances
I can always add more machines....
But you can’t change or modify the fixed
network once instances are running
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
Easy	
  to	
  add	
  physical	
  nodes	
  and/or	
  
networks
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
Easy	
  to	
  add	
  physical	
  nodes	
  and/or	
  
networks
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
Easy	
  to	
  add	
  physical	
  nodes	
  and/or	
  
networks
Don’t	
  try	
  to	
  change	
  the	
  fixed	
  
network	
  once	
  in	
  production
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
Easy	
  to	
  add	
  physical	
  nodes	
  and/or	
  
networks
Don’t	
  try	
  to	
  change	
  the	
  fixed	
  
network	
  once	
  in	
  production
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Build	
  with	
  the	
  End	
  in	
  Mind
2	
  networks	
  (3	
  w/	
  floating	
  IPs)
1)	
  Host	
  Network
2)	
  Fixed	
  Network
3)	
  Floating	
  network
Easy	
  to	
  add	
  physical	
  nodes	
  and/or	
  
networks
Don’t	
  try	
  to	
  change	
  the	
  fixed	
  
network	
  once	
  in	
  production
Easy	
  to	
  add	
  additional	
  floating	
  
networks
nova-network
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Images
Building images talk tomorrow @1:50 in room C123
Format: raw qcow2 vdi ...
Container: bare ami bundle ...
Cloud tech: cloud-init none
Partitioning: fixed dynamic
Drivers: virtio vhost_net xen ...
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Glance
File	
  backed	
  (local)	
  
Alternatives:	
  Swift,	
  CloudFiles,	
  NFS	
  (locally	
  mounted)
Snapshots?
qcow2	
  format:	
  “snapshot_image_format=qcow2“
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Glance	
  Performance
Network	
  Throughput:	
  1Gbps	
  =	
  125MBps	
  (expect	
  ~112MB/s)
RAID	
  5	
  -­‐	
  large	
  sequential	
  read/writes
Disk	
  Bandwidth	
  >	
  IOPS
Improve	
  cache	
  -­‐	
  Reduce	
  #	
  of	
  images	
  
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Glance	
  Performance
Network	
  Throughput:	
  1Gbps	
  =	
  125MBps	
  (expect	
  ~112MB/s)
RAID	
  5	
  -­‐	
  large	
  sequential	
  read/writes
Disk	
  Bandwidth	
  >	
  IOPS
Improve	
  cache	
  -­‐	
  Reduce	
  #	
  of	
  images	
  
Image	
  Size Not	
  Cached Cached
1.4GB 20secs 1sec
16.4GB 2min	
  21secs 1sec
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Glance	
  Performance
Network	
  Throughput:	
  1Gbps	
  =	
  125MBps	
  (expect	
  ~112MB/s)
RAID	
  5	
  -­‐	
  large	
  sequential	
  read/writes
Disk	
  Bandwidth	
  >	
  IOPS
Improve	
  cache	
  -­‐	
  Reduce	
  #	
  of	
  images	
  
Image	
  Size Not	
  Cached Cached
1.4GB 20secs 1sec
16.4GB 2min	
  21secs 1sec
*times	
  from	
  “creating	
  
image”	
  to	
  	
  “qemu-­‐img	
  
create”
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Images	
  and	
  Storage
Storage
4	
  focus	
  points:	
  Glance,	
  Compute	
  (local),	
  Cinder,	
  Swift
Glance	
  -­‐	
  Space,	
  Sequential	
  read/write
Compute	
  -­‐	
  random	
  IO
Cinder	
  -­‐	
  Performance,	
  Density
Swift	
  -­‐	
  JBOD,	
  density
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Architecture	
  Examples	
  and	
  Thoughts
1	
  -­‐	
  20	
  physical	
  servers
Single	
  controller
Single	
  API	
  
Single	
  network	
  (1Gbps	
  or	
  2Gbps)
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Architecture	
  Examples	
  and	
  Thoughts
20-­‐100	
  servers
HA	
  controllers	
  and	
  load	
  balanced	
  
APIs
Swift/CloudFiles	
  for	
  Glance
Availability	
  Zones
Consider	
  “frontend”	
  and	
  “backend”	
  
networks
Compute	
  Node	
  metrics	
  -­‐	
  Dedicated	
  
Machine(s)
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Performance	
  Considerations	
  and	
  Bottlenecks
IO
Random	
  IO
Reduce	
  IO	
  per	
  instance
Block	
  Storage!
Review	
  Hypervisor	
  best	
  practices	
  
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Performance	
  Considerations	
  and	
  Bottlenecks
IO
Random	
  IO
Reduce	
  IO	
  per	
  instance
Block	
  Storage!
Review	
  Hypervisor	
  best	
  practices	
  
0" 200" 400" 600" 800" 1000" 1200" 1400" 1600"
compute/host"
compute/host"(no"ht)"
compute/host"(deadline)"
Rs/speed/test13"(deadline"cache=none)"
Rs/speed/test13"(cfq,"cache=none,"no"ht)"
Rs/speed/test12"(cfq"cache=none)"
Rs/speed/test12"(noop"cache=none)"
rs/speed/test13"(cfq,"cache=writeback)"
Rs/speed/test13"(noop,"cache=writeback)"
rs/speed/test12"(cfq,"host"deadline,"cache=none)"
Async&Random&IO&
randW"(direct)"
randR"(direct)"
randW"
randR"
0"
2000"
4000"
6000"
8000"
10000"
12000"
14000"
randR" randW" randR"
(direct)"
randW"
(direct)"
seqR" seqW" seqR"
(direct)"
seqw"
(direct)"
Host&vs.&Instance&
compute/host"
Rs/speed/test12"(cfq"cache=none)"
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Lessons	
  Learned
Lessons	
  learned
Floating	
  IPs	
  MUST	
  be	
  associated	
  with	
  the	
  “public_interface”
Each	
  piece	
  of	
  OpenStack	
  has	
  its	
  own	
  architecture
Folsom	
  is	
  stable	
  
Migration	
  (live,	
  block)	
  works	
  but	
  scenarios	
  exist	
  where	
  it	
  
doesn’t
OpenStack	
  is	
  still	
  changing	
  often,	
  keep	
  up	
  to	
  date	
  with	
  
current	
  state	
  of	
  the	
  projects
Don’t	
  do	
  Heterogeneous	
  Nodes
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Operational	
  Updates
nova	
  hypervisor*	
  calls
Image	
  types	
  in	
  Glance
policy.json
Coming	
  in	
  Grizzly:
Cells	
  
Quantum	
  
Better	
  LDAP/AD	
  support
Monday, April 15, 13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
But....
But	
  this	
  is	
  a	
  design	
  summit	
  also
Open	
  to	
  discussions/thoughts/
questions
Monday, April 15, 13
RACKSPACE® HOSTING | 5000 WALZEM ROAD | SAN ANTONIO, TX 78218
US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM
Rackspace	
  is	
  hiring
www.rackertalent.com
Monday, April 15, 13

Consideration for Building a Private Cloud

  • 1.
    April 2013 Considerations  for  Building   a  Private  Cloud Folsom  Update   Ryan  Richard,  RHCA OpenStack  Architect  -­‐  Private  Cloud ryan.richard@rackspace.com @rackninja Monday, April 15, 13
  • 2.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Why  Folsom? Monday, April 15, 13
  • 3.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM What  is  a  Private  Cloud? Elastic  or  Traditional  Virtualization  (hint:  Pick  One!) Multi-­‐tenant  (Multi-­‐Application) Size Private  API  endpoints Limited  inbound  connectivity Customized  for  specific  workloads Monday, April 15, 13
  • 4.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind  #  of  instances  on  this  physical  host? Flavor: m1.tiny Ram: 512MiB vCPU: 1 Disk: 0 (size of image) Total instances: ? 48 vCPU Ram Disk Monday, April 15, 13
  • 5.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind  #  of  instances  on  this  physical  host? Flavor: m1.medium Ram: 4096MiB vCPU: 2 Disk: 10GiB + 40GiB Total instances: 24 vCPU Ram Disk Monday, April 15, 13
  • 6.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind  #  of  instances  on  this  physical  host? Flavor: ram heavy Ram: 64GiB vCPU: 8 Disk: 100GiB Total instances: 2 vCPU Ram Disk Monday, April 15, 13
  • 7.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Capacity  Thoughts Don’t allow disk size of 0 Public Cloud: Limit flavors to image size Private Cloud: Can add flavors for specific application profiles Network Utilization Monday, April 15, 13
  • 8.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Capacity  Thoughts I can always add more machines.... But you can’t change or modify the fixed network once instances are running Monday, April 15, 13
  • 9.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Capacity  Thoughts (resource  /  resource  in  smallest  flavor)  =  maximum  #  of   instances  per  machine Fixed  Network  -­‐  Double  or  quadruple  number  of  expected   instances I can always add more machines.... But you can’t change or modify the fixed network once instances are running Monday, April 15, 13
  • 10.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network nova-network Monday, April 15, 13
  • 11.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network nova-network Monday, April 15, 13
  • 12.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network Easy  to  add  physical  nodes  and/or   networks nova-network Monday, April 15, 13
  • 13.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network Easy  to  add  physical  nodes  and/or   networks nova-network Monday, April 15, 13
  • 14.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network Easy  to  add  physical  nodes  and/or   networks Don’t  try  to  change  the  fixed   network  once  in  production nova-network Monday, April 15, 13
  • 15.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network Easy  to  add  physical  nodes  and/or   networks Don’t  try  to  change  the  fixed   network  once  in  production nova-network Monday, April 15, 13
  • 16.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Build  with  the  End  in  Mind 2  networks  (3  w/  floating  IPs) 1)  Host  Network 2)  Fixed  Network 3)  Floating  network Easy  to  add  physical  nodes  and/or   networks Don’t  try  to  change  the  fixed   network  once  in  production Easy  to  add  additional  floating   networks nova-network Monday, April 15, 13
  • 17.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Images Building images talk tomorrow @1:50 in room C123 Format: raw qcow2 vdi ... Container: bare ami bundle ... Cloud tech: cloud-init none Partitioning: fixed dynamic Drivers: virtio vhost_net xen ... Monday, April 15, 13
  • 18.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Glance File  backed  (local)   Alternatives:  Swift,  CloudFiles,  NFS  (locally  mounted) Snapshots? qcow2  format:  “snapshot_image_format=qcow2“ Monday, April 15, 13
  • 19.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Glance  Performance Network  Throughput:  1Gbps  =  125MBps  (expect  ~112MB/s) RAID  5  -­‐  large  sequential  read/writes Disk  Bandwidth  >  IOPS Improve  cache  -­‐  Reduce  #  of  images   Monday, April 15, 13
  • 20.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Glance  Performance Network  Throughput:  1Gbps  =  125MBps  (expect  ~112MB/s) RAID  5  -­‐  large  sequential  read/writes Disk  Bandwidth  >  IOPS Improve  cache  -­‐  Reduce  #  of  images   Image  Size Not  Cached Cached 1.4GB 20secs 1sec 16.4GB 2min  21secs 1sec Monday, April 15, 13
  • 21.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Glance  Performance Network  Throughput:  1Gbps  =  125MBps  (expect  ~112MB/s) RAID  5  -­‐  large  sequential  read/writes Disk  Bandwidth  >  IOPS Improve  cache  -­‐  Reduce  #  of  images   Image  Size Not  Cached Cached 1.4GB 20secs 1sec 16.4GB 2min  21secs 1sec *times  from  “creating   image”  to    “qemu-­‐img   create” Monday, April 15, 13
  • 22.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Images  and  Storage Storage 4  focus  points:  Glance,  Compute  (local),  Cinder,  Swift Glance  -­‐  Space,  Sequential  read/write Compute  -­‐  random  IO Cinder  -­‐  Performance,  Density Swift  -­‐  JBOD,  density Monday, April 15, 13
  • 23.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Architecture  Examples  and  Thoughts 1  -­‐  20  physical  servers Single  controller Single  API   Single  network  (1Gbps  or  2Gbps) Monday, April 15, 13
  • 24.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Architecture  Examples  and  Thoughts 20-­‐100  servers HA  controllers  and  load  balanced   APIs Swift/CloudFiles  for  Glance Availability  Zones Consider  “frontend”  and  “backend”   networks Compute  Node  metrics  -­‐  Dedicated   Machine(s) Monday, April 15, 13
  • 25.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Performance  Considerations  and  Bottlenecks IO Random  IO Reduce  IO  per  instance Block  Storage! Review  Hypervisor  best  practices   Monday, April 15, 13
  • 26.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Performance  Considerations  and  Bottlenecks IO Random  IO Reduce  IO  per  instance Block  Storage! Review  Hypervisor  best  practices   0" 200" 400" 600" 800" 1000" 1200" 1400" 1600" compute/host" compute/host"(no"ht)" compute/host"(deadline)" Rs/speed/test13"(deadline"cache=none)" Rs/speed/test13"(cfq,"cache=none,"no"ht)" Rs/speed/test12"(cfq"cache=none)" Rs/speed/test12"(noop"cache=none)" rs/speed/test13"(cfq,"cache=writeback)" Rs/speed/test13"(noop,"cache=writeback)" rs/speed/test12"(cfq,"host"deadline,"cache=none)" Async&Random&IO& randW"(direct)" randR"(direct)" randW" randR" 0" 2000" 4000" 6000" 8000" 10000" 12000" 14000" randR" randW" randR" (direct)" randW" (direct)" seqR" seqW" seqR" (direct)" seqw" (direct)" Host&vs.&Instance& compute/host" Rs/speed/test12"(cfq"cache=none)" Monday, April 15, 13
  • 27.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Lessons  Learned Lessons  learned Floating  IPs  MUST  be  associated  with  the  “public_interface” Each  piece  of  OpenStack  has  its  own  architecture Folsom  is  stable   Migration  (live,  block)  works  but  scenarios  exist  where  it   doesn’t OpenStack  is  still  changing  often,  keep  up  to  date  with   current  state  of  the  projects Don’t  do  Heterogeneous  Nodes Monday, April 15, 13
  • 28.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM Operational  Updates nova  hypervisor*  calls Image  types  in  Glance policy.json Coming  in  Grizzly: Cells   Quantum   Better  LDAP/AD  support Monday, April 15, 13
  • 29.
    RACKSPACE® HOSTING |WWW.RACKSPACE.COM But.... But  this  is  a  design  summit  also Open  to  discussions/thoughts/ questions Monday, April 15, 13
  • 30.
    RACKSPACE® HOSTING |5000 WALZEM ROAD | SAN ANTONIO, TX 78218 US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM Rackspace  is  hiring www.rackertalent.com Monday, April 15, 13