[ceph-users] 回复: 回复: Re: [luminous]OSD memory usage increase when writing^J a lot of data to cluster

shadow_lin shadow_lin at 163.com
Thu Nov 2 00:47:37 PDT 2017


Hi Sage,
I did some more test and found this:
I use  ceph tell osd.6 heap stats to found that
osd.6 tcmalloc heap stats:------------------------------------------------
MALLOC:      404608432 (  385.9 MiB) Bytes in use by application
MALLOC: +     26599424 (   25.4 MiB) Bytes in page heap freelist
MALLOC: +     13442496 (   12.8 MiB) Bytes in central cache freelist
MALLOC: +     21112288 (   20.1 MiB) Bytes in transfer cache freelist
MALLOC: +     21702320 (   20.7 MiB) Bytes in thread cache freelists
MALLOC: +      3021024 (    2.9 MiB) Bytes in malloc metadata
MALLOC:   ------------
MALLOC: =    490485984 (  467.8 MiB) Actual memory used (physical + swap)
MALLOC: +    162922496 (  155.4 MiB) Bytes released to OS (aka unmapped)
MALLOC:   ------------
MALLOC: =    653408480 (  623.1 MiB) Virtual address space used
MALLOC:
MALLOC:          12958              Spans in use
MALLOC:             32              Thread heaps in use
MALLOC:           8192              Tcmalloc page size


and the page heap won't release by osd itself and keep increasing,but if i use "ceph tell osd.6 heap release" to manual release it then the page heap freelist is released.

osd.6 tcmalloc heap stats:------------------------------------------------
MALLOC:      404608432 (  385.9 MiB) Bytes in use by application
MALLOC: +     26599424 (   25.4 MiB) Bytes in page heap freelist
MALLOC: +     13442496 (   12.8 MiB) Bytes in central cache freelist
MALLOC: +     21112288 (   20.1 MiB) Bytes in transfer cache freelist
MALLOC: +     21702320 (   20.7 MiB) Bytes in thread cache freelists
MALLOC: +      3021024 (    2.9 MiB) Bytes in malloc metadata
MALLOC:   ------------
MALLOC: =    490485984 (  467.8 MiB) Actual memory used (physical + swap)
MALLOC: +    162922496 (  155.4 MiB) Bytes released to OS (aka unmapped)
MALLOC:   ------------
MALLOC: =    653408480 (  623.1 MiB) Virtual address space used
MALLOC:
MALLOC:          12958              Spans in use
MALLOC:             32              Thread heaps in use
MALLOC:           8192              Tcmalloc page si


i found this problem was discussed  before at http://tracker.ceph.com/issues/12681, is it a tcmalloc problem?


2017-11-02 


lin.yunfan



发件人:Sage Weil <sage at newdream.net>
发送时间:2017-11-01 20:11
主题:Re: 回复: Re: [ceph-users] [luminous]OSD memory usage increase when writing^J a lot of data to cluster
收件人:"shadow_lin"<shadow_lin at 163.com>
抄送:"ceph-users"<ceph-users at lists.ceph.com>

On Wed, 1 Nov 2017, shadow_lin wrote: 
> Hi Sage, 
> We have tried compiled the latest ceph source code from github. 
> The build is ceph version 12.2.1-249-g42172a4 
> (42172a443183ffe6b36e85770e53fe678db293bf) luminous (stable). 
> The memory problem seems better but the memory usage of osd is still keep 
> increasing as more data are wrote into the rbd image and the memory usage 
> won't drop after the write is stopped. 
>        Could you specify from which commit the memeory bug is fixed? 

f60a942023088cbba53a816e6ef846994921cab3 and the prior 2 commits. 

If you look at 'cpeh daemon osd.nnn dump_mempools' you can see three 
bluestore pools.  This is what bluestore is using to account for its usage  
so it can know when to trim its cache.  Do those add up to the  
bluestore_cache_size - 512m (for rocskdb) that you have configured? 

sage 


> Thanks 
> 2017-11-01 
>  
> ____________________________________________________________________________ 
> body {font-size:10.5pt; font-family:微软雅黑,serif} lin.yunfan 
>  
> ____________________________________________________________________________ 
>       发件人:Sage Weil <sage at newdream.net> 
> 发送时间:2017-10-24 20:03 
> 主题:Re: [ceph-users] [luminous]OSD memory usage increase when 
> writing a lot of data to cluster 
> 收件人:"shadow_lin"<shadow_lin at 163.com> 
> 抄送:"ceph-users"<ceph-users at lists.ceph.com> 
>   
> On Tue, 24 Oct 2017, shadow_lin wrote:  
> > BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em} body  
> > {border-width:0;margin:0} img {border:0;margin:0;padding:0} Hi All,  
> > The cluster has 24 osd with 24 8TB hdd.  
> > Each osd server has 2GB ram and runs 2OSD with 2 8TBHDD. I know the memor 
> y  
> > is below the remmanded value, but this osd server is an ARM  server so I 
?? ?> can't do anything to add more ram.  
> > I created a replicated(2 rep) pool and an 20TB image and mounted to the t 
> est  
> > server with xfs fs.   
> >    
> > I have set the ceph.conf to this(according to other related post suggeste 
> d):  
> > [osd]  
> >         bluestore_cache_size = 104857600  
> >         bluestore_cache_size_hdd = 104857600  
> >         bluestore_cache_size_ssd = 104857600  
> >         bluestore_cache_kv_max = 103809024  
> >    
> >  osd map cache size = 20  
> >         osd map max advance = 10  
> >         osd map share max epochs = 10  
> >         osd pg epoch persisted max stale = 10  
> > The bluestore cache setting did improve the situation,but if i try to wri 
> te  
> > 1TB data by dd command(dd if=/dev/zero of=test bs=1G count=1000)  to rbd 
?? ?the  
> > osd will eventually be killed by oom killer.  
> > If I only wirte like 100G  data once then everything is fine.  
> >    
> > Why does the osd memory usage keep increasing whle writing ?  
> > Is there anything I can do to reduce the memory usage?  
>   
> There is a bluestore memory bug that was fixed just after 12.2.1 was   
> released; it will be fixed in 12.2.2.  In the meantime, you can run   
> consider running the latest luminous branch (not fully tested) from  
> https://shaman.ceph.com/builds/ceph/luminous.  
>   
> sage  
>  
>  
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20171102/334384da/attachment.html>


More information about the ceph-users mailing list