Re: Python get_stats() gives wrong number of objects?

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

 



On Mon, Jan 30, 2017 at 4:06 PM, Kent Borg <kentborg@xxxxxxxx> wrote:
> I have been playing with the Python version of librados and am getting
> startling answers from get_stats() on a pool. I am seeing 'num_objects' as
> zero at a point where I am expecting one. But if I loop, waiting for my
> expected one, I will get it in a second or so.
>
> I think I created this object with a synchronous write() but I sprinkled
> aio_flush() calls in my code for good measure, still have the same problem.
>
> My code is single threaded and the only code running against this cluster.
> Why would I get a delayed answer?

Pool stats are not synchronous -- when you call get_stats it is not
querying every OSD in the system before giving you a response.  The
OSDs send periodic stats reports about their PGs to the monitor, and
the stats you're getting are whatever was the most recent data on the
mon.

John

> Another hint: the pool has been freshly created by my same script, and I
> notice that pool creation and deletion is slow...is there some explicit wait
> I should do after creating a pool before using it?
>
> Thanks,
>
> -kb
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
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