Stanza to add cgroup support to ceph upstart jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As I currently only have three nodes, I'm running in the non-recommended configuration where I've got both VMs and ceph running on the same hosts; I added the stanza below to the upstart jobs for ceph-mon, ceph-mds and ceph-osd, and it much improved the contention between ceph and the VMs. I'm not entirely certain that I'm doing things correctly as far as cgroups are concerned, but it does at least appear to achieve the desired result.

post-start script
    set -e

    #CGROUP=ceph

    [ -f /etc/default/ceph ] && . /etc/default/ceph

    if [ -n "$CGROUP" ] ; then
pid=$(status $UPSTART_JOB id=$id cluster=${cluster:-ceph} | head -n1 | egrep -oi '([0-9]+)$')

for subsystem in $(mount -t cgroup | awk '{ print $3 }' | uniq) ; do
            if [ ! -d $subsystem/$CGROUP ] ; then
                mkdir -p $subsystem/$CGROUP || true
            fi
            if [ -w $subsystem/$CGROUP/tasks ] ; then
                echo $pid > $subsystem/$CGROUP/tasks || true
            fi
        done
    fi
end script

--
Martin Rudat


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux