8 balls with radius 1 are packed into a regular cylinder. They are arranged in two layers with each layer has 4 balls. Each ball is tangent to 2 balls in the same layer and 2 balls in the other layer. Moreover, each ball is tangent to the side surface and one base of the cylinder. Under such an arrangement, what is the height of the cylinder?