All of lore.kernel.org
 help / color / mirror / Atom feed
* ceph encoding optimization
@ 2015-11-04 15:00 池信泽
  2015-11-04 15:05 ` Sage Weil
  2015-11-04 15:07 ` Gregory Farnum
  0 siblings, 2 replies; 13+ messages in thread
From: 池信泽 @ 2015-11-04 15:00 UTC (permalink / raw)
  To: ceph-devel

hi, all:

     I am focus on the cpu usage of ceph now. I find the struct (such
as pg_info_t , transaction and so on) encode and decode exhaust too
much cpu resource.

     For now, we should encode every member variable one by one which
calling encode_raw finally. When there are many members, we should
encode it many times. But I think, we could reduce some in some cases.

     For example , struct A { int a; int b; int c }; ceph would
encoding int a , and then encode int b , finally int c. But for this
case , we could calling bufferlist.append((char *)(&a), sizeof(A))
because there are not padding bytes in this struct.

     I use the above optimization, the cpu usage of object_stat_sum_t
encoding decrease from 0.5% to 0% (I could not see any using perf
tools).

     This is only a case, so I think we could do similar optimization
other struct. I think we should pay attention to the padding in
struct.

-- +
Regards,
xinze

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-12-03  9:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04 15:00 ceph encoding optimization 池信泽
2015-11-04 15:05 ` Sage Weil
2015-11-04 15:07 ` Gregory Farnum
2015-11-04 15:33   ` 池信泽
2015-11-04 17:19     ` Piotr.Dalek
2015-11-04 17:29       ` Haomai Wang
2015-11-07 13:40         ` Haomai Wang
2015-11-08 14:28           ` Sage Weil
2015-11-09 15:05             ` Gregory Farnum
2015-11-09 15:24               ` Sage Weil
2015-11-09 17:54                 ` Milosz Tanski
2015-12-03  9:17                   ` Xinze Chi (信泽)
2015-12-03  9:29                     ` Piotr.Dalek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.