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
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):
Steps to Reproduce:
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.
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.
- 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.
- 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.
This is fixed now. Default size is 512K and user can change it using CHUNK_SIZE.
Fixed in docker-1.8