# Slow acts as ferret indexing - taking 7 days for 10Million rows (2GB db)

**URL:** <https://www.ruby-forum.com/t/slow-acts-as-ferret-indexing-taking-7-days-for-10million-rows-2gb-db/182084>\
**Category:** Rails\
**Created:** [January 22, 2010, 11:04am UTC](https://www.ruby-forum.com/t/slow-acts-as-ferret-indexing-taking-7-days-for-10million-rows-2gb-db/182084 "2010-01-22T11:04:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a8b319/32.png) [@madhu](https://www.ruby-forum.com/u/madhu)\
**Post date:** [January 22, 2010, 11:04am UTC](https://www.ruby-forum.com/t/slow-acts-as-ferret-indexing-taking-7-days-for-10million-rows-2gb-db/182084/1 "2010-01-22T11:04:35Z")

</div>

The Ferret Indexing is taking very 7 days to complete (table  
with10Million row - DB size is about 2 gb). I could see my memory is  
used only 40% and cpu is utilized only 10%. but still the indexing is  
slow.

I am running ferret through DRB

My acts\_as\_ferret index definition looks something like this.

module Ferret::Analysis  
class MyAnalyzer  
def token\_stream(field,text)  
StemFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)))  
end  
end  
end

ActsAsFerret::define\_index(‘my\_index’,  
:models =\> {  
Product =\> {  
:fields =\> {  
:field\_one =\> {:boost =\> 0.0576},  
:field\_two =\> {:boost =\> 0.0432},  
:field\_three =\> {:boost =\> 0.0432},  
:field\_four =\> {:boost =\> 0.0432},  
:field\_five =\> {:boost =\> 0.0144},  
:field\_six =\> :boost =\> 0.0144},  
:field\_seven =\> {:boost =\> 0.0036},  
:field\_eight =\> {:boost =\> 0.0036},  
:field\_nine =\> {:boost =\> 0.0036},  
:field\_ten =\> {:boost =\> 0.0009},  
:field\_eleven =\> {:boost =\> 0.0006},  
:field\_twelve =\> {:boost =\> 0.0002},  
:field\_thirteen =\> {:boost =\> 0.0000001}  
}  
}  
},  
:ferret =\> { :or\_default =\> true,  
:analyzer =\> Ferret::Analysis::MyAnalyzer.new  
},  
:remote =\> true,  
:max\_buffer\_memory =\> 536870912, #setting to 512 MB for faster  
indexing. default value is 16 Mb.  
:merge\_factor =\> 5 #default value is 10. Lower number will speed up  
search but slow down indexing  
)

Is there anyway I can improve the performance of indexing ? I really  
love ferret and acts\_as\_ferret and and don’t want to give-up to sphinx  
if there is a way.

appreciate your reply

regards  
madhu
