Re: Increase number of read and writes

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

 



Den tors 23 apr. 2020 kl 16:07 skrev Bobby <italienisch1987@xxxxxxxxx>:

> Hi,
>
> I am using Ceph in developer mode. Currently I am implementing Librados
> examples which are also available in Introduction to Librados section
>
> https://docs.ceph.com/docs/master/rados/api/librados-intro/#step-3-creating-an-i-o-context
> .
> It says once your app has a cluster handle and a connection to a Ceph
> Storage Cluster, you may create an I/O Context and begin reading and
> writing data.  For example,
>
> *err = rados_write(io, "hw", "Hello World!", 12, 0);
>


>
> My question, Is "12" is the number of writes? Because I want to test the
> with high number of read and writes.
>
> Looking for help !
>

Just check what parameters the function takes:
CEPH_RADOS_API
<https://docs.ceph.com/docs/master/rados/api/librados/#c.CEPH_RADOS_API>
 int rados_write(rados_ioctx_t
<https://docs.ceph.com/docs/master/rados/api/librados/#c.rados_ioctx_t>* io*,
const char ** oid*, const char ** buf*, size_t* len*, uint64_t* off*)¶
<https://docs.ceph.com/docs/master/rados/api/librados/#c.rados_write>

Write *len* bytes from *buf* into the *oid* object, starting at offset *off*.
The value of *len* must be <= UINT_MAX/2.


The 12 seems to be the lenght of "Hello World!" in bytes, which matches
what a normal write() call would need.
In order to test high number of writes, you need to send lots of write
calls in parallel.

(Or just get fio with rbd support compiled in, this is a solved problem
already how to benchmark ceph at a low level)

-- 
May the most significant bit of your life be positive.
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[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