Book Image

Ceph Cookbook

Book Image

Ceph Cookbook

Overview of this book

Ceph is a unified, distributed storage system designed for excellent performance, reliability, and scalability. This cutting-edge technology has been transforming the storage industry, and is evolving rapidly as a leader in software-defined storage space, extending full support to cloud platforms such as Openstack and Cloudstack, including virtualization platforms. It is the most popular storage backend for Openstack, public, and private clouds, so is the first choice for a storage solution. Ceph is backed by RedHat and is developed by a thriving open source community of individual developers as well as several companies across the globe. This book takes you from a basic knowledge of Ceph to an expert understanding of the most advanced features, walking you through building up a production-grade Ceph storage cluster and helping you develop all the skills you need to plan, deploy, and effectively manage your Ceph cluster. Beginning with the basics, you’ll create a Ceph cluster, followed by block, object, and file storage provisioning. Next, you’ll get a step-by-step tutorial on integrating it with OpenStack and building a Dropbox-like object storage solution. We’ll also take a look at federated architecture and CephFS, and you’ll dive into Calamari and VSM for monitoring the Ceph environment. You’ll develop expert knowledge on troubleshooting and benchmarking your Ceph storage cluster. Finally, you’ll get to grips with the best practices to operate Ceph in a production environment.
Table of Contents (18 chapters)
Ceph Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Profiling Ceph memory


Memory profiling is the process of dynamic program analysis to determine a program's memory consumption and identify ways to optimize it. In this recipe, we discuss how you can use memory profilers on the Ceph daemons for memory investigation.

How to do it…

  1. Start the memory profiler on a specific daemon:

    # ceph tell osd.0 heap start_profiler
    

    Note

    To auto-start profiler as soon as the ceph OSD daemon starts, set the environment variable as CEPH_HEAP_PROFILER_INIT=true.

  2. It's a good idea to keep the profiler running for a few hours so that it can collect as much information related to memory footprint as possible. At the same time, you can also generate some load on the cluster.

  3. Next, print heap statistics about the memory footprint that the profiler has collected:

    # ceph tell osd.0 heap stats
    
  4. You can also dump heap stats on a file that can be used later; by default, it will create the dump file as /var/log/ceph/osd.0.profile.0001.heap:

    # ceph tell osd.0 heap dump
    
  5. To read this...