Thank you very much. When I set debug_rgw = 0 from default settings, std::locale dispeared. And the performance improved a little bit. I am using v12.2.4 . Is there any improvment related to log in the later ceph version? Or how should I configure it? And now perf show the following, I think lock cosume too much time, and cpu utilization is very low. Is there any improvment on this ? : 4.04% libtcmalloc_minimal.so.4.4.5 [.] operator new[] 2.57% libc-2.17.so [.] __strcasecmp_l_avx 2.15% libpthread-2.17.so [.] pthread_mutex_lock 2.07% libtcmalloc_minimal.so.4.4.5 [.] tc_deletearray_nothrow 2.03% libstdc++.so.6.0.19 [.] 0x000000000005b2ad 1.87% libpthread-2.17.so [.] pthread_mutex_unlock 1.69% libstdc++.so.6.0.19 [.] std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string 1.61% libstdc++.so.6.0.19 [.] std::string::assign 1.60% libc-2.17.so [.] __strlen_sse2_pminub 1.48% libc-2.17.so [.] __GI___strncasecmp_l 1.37% libstdc++.so.6.0.19 [.] __dynamic_cast 1.31% libc-2.17.so [.] __memcpy_ssse3_back 1.12% libc-2.17.so [.] __strptime_internal 1.08% libc-2.17.so [.] vfprintf 1.06% libc-2.17.so [.] __strftime_internal 1.02% libc-2.17.so [.] __strncmp_sse42 0.90% libc-2.17.so [.] __strlen_sse2 0.88% libc-2.17.so [.] __memcmp_sse4_1 On Tue, Oct 30, 2018 at 11:53 PM kefu chai <tchaikov@xxxxxxxxx> wrote: > > On Tue, Oct 30, 2018 at 5:36 PM Will Zhao <zhao6305@xxxxxxxxx> wrote: > > > > Hi: > > I was trying to figure out how to imporve rgw performance , and I > > found std::locale comsuming a lot of cpu . Is this normal ? which part > > of rgw is using this? > > Will, probably you could lower the log level and try again? i guess > that it's our logging subsystem who is creating/destroying > std::locale. also, what version of Ceph are you testing? > > > > > 18.99% libstdc++.so.6.0.19 [.] std::use_facet<std::ctype<char> > > > > > 18.59% [kernel] [k] native_queued_spin_lock_slowpath > > > > 8.32% libstdc++.so.6.0.19 [.] std::locale::locale > > > > 5.72% libstdc++.so.6.0.19 [.] std::locale::~locale > > > > 2.49% libstdc++.so.6.0.19 [.] std::num_put<char, > > std::ostreambuf_iterator<char, std::char_traits<char> > > > >::_M_insert_int<long> > > > > 2.36% libstdc++.so.6.0.19 [.] std::has_facet<std::num_put<char, > > std::ostreambuf_iterator<char, std::char_traits<char> > > > > > > > 2.22% libstdc++.so.6.0.19 [.] std::use_facet<std::num_put<char, > > std::ostreambuf_iterator<char, std::char_traits<char> > > > > > > > 2.00% libstdc++.so.6.0.19 [.] std::has_facet<std::num_get<char, > > std::istreambuf_iterator<char, std::char_traits<char> > > > > > > > 1.79% libstdc++.so.6.0.19 [.] std::use_facet<std::num_get<char, > > std::istreambuf_iterator<char, std::char_traits<char> > > > > > > > 1.47% libstdc++.so.6.0.19 [.] std::num_put<char, > > std::ostreambuf_iterator<char, std::char_traits<char> > > > >::_M_insert_int<unsigned long> > > > > -- > Regards > Kefu Chai