Bug 1214423

Summary: [docker-storage-setup] Determine the default optimal chunk/block size for docker workload
Product: Red Hat Enterprise Linux 7 Reporter: Vivek Goyal <vgoyal>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: agk, dwalsh, ekuric, jeder, lsm5, msnitzer, pasik, thornber, zkabelac
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-07 21:44:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vivek Goyal 2015-04-22 16:51:14 UTC
Description of problem:

docker-storage-setup will be setting up thin pool for docker. One of the problems we are facing is what's the right chunk/block size for the pool for
docker workload. And that will also help in determining the size of metadata
device.

So I am opening this bug to keep track of this conversation. Any opinions,
recommendation, arguments or test results can go in there. And we will have a single place to collect all these.

And at the end of it, we should be able to decide default chunk size for
thin pool for docker.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Vivek Goyal 2015-04-22 17:16:13 UTC
Let us use docker-storage-setup to setup thin pools for our testing. Because that's what we are recommending to customers. And that way we will also know what kind of issues customer will face during setup.

Comment 4 Vivek Goyal 2015-04-22 18:41:22 UTC
Here are some steps on how to use docker-storage-setup with different chunk sizes.

- Install docker-storage-setup from here. One in F21 is not latest enough. I have not checked rawhide though.

https://github.com/projectatomic/docker-storage-setup

- Make sure lvm2 version is >= lvm2-2.02.112

- Get a disk or partition and create a volume group. Say you have a partition /dev/sda2 free. Do following.

  # pvcreate /dev/sda2
  # vgcreate docker-test /dev/sda2

- Now volume docker-test must have been created. Now create a file /etc/sysconfig/docker-storage-setup with following contents. Following just
tells d-s-s that use volume group docker-test and create a thin pool.

VG=docker-test
SETUP_LVM_THIN_POOL=yes

- Right now d-s-s does not provide controls to change chunk size. One needs to
  modify script manually. There is a single invocation of command "lvconvert". Find it and add option -c <chunk_size> in their. Specify the chunk size  you want to test. For example.

lvconvert -c 512K -y --thinpool $VG/$DATA_LV_NAME --poolmetadata $VG/$META_LV_NAME

- Run d-s-s and it should create a thin pool now. Verify it using "lvs" command.

- Also run "dmsetup table" command. It should show that a thin pool has been 
  activated. An example is as follows.

 docker--test-docker--pool: 0 1707204608 thin-pool 253:7 253:8 1024 0 0

- Make sure that pool block size is same as chunk size you wanted. "dmsetup table" output line has block size in terms of 512 bytes sectors. For example in
above line third last field, (1024) is block size. It says block size is 1024 sectors of 512 bytes each. So effective block size is 1024 * 512 = 512K.

Please let me know if you run into issues.

Comment 5 Vivek Goyal 2015-10-28 14:40:21 UTC
This is fixed now. Default size is 512K and user can change it using CHUNK_SIZE.

Comment 6 Daniel Walsh 2015-10-28 14:51:06 UTC
Fixed in docker-1.8