Cloud computing is characterized by its essentially pay-per-use pricing with elasticity. Typically, the granularity of usage for such pricing is at virtual machine (VM) level in IaaS clouds, e.g., a multiple of machine hours. The elasticity and cost effectiveness in these clouds are primarily achieved through the exploitation of resource virtualization and sharing. However, a majority of applications running on VMs in clouds struggle to fully utilize resources allocated to them. Since co-location granularity is strictly restricted to VM level and resources allocated to VMs are space-shared, the unused resources are apt to be wasted while users are still charged for such wastage. In this paper, we address the problem of fine-grained and adaptive resource sharing for real pay-per-use pricing. To this end, we devise a resource management mechanism as a cost efficiency solution for both users and providers of clouds. The mechanism consists of a container-based resource allocator and a real-usage based pricing scheme. We demonstrate the efficacy of this mechanism via experiments, in Amazon EC2, using two typical workloads in clouds, web services and database services, and a compute-intensive high energy physics application. Our results show that the mechanism can achieve near-optimal cost efficiency.