Search seems slow with apache solr
I'm experimenting with Apache Solr and Dovecot. As far as I can tell, I have dovecot working with Apache Solr as demonstrated by this output:
a search text "cash"
- SEARCH 4 8 26 35 45 52 54 55 63 a OK Search completed (0.356 + 0.001 + 0.068 secs).
However, when using the roundcube search bar and search all messages on a single word, it takes about 18 seconds. This seems slow as I only have about 4300 message in all my folders. But I'm not sure as I have nothing to compare it to.
Is there a way I can test whether roundcube is using solr to perform searches?
On 2021-04-04 18:24, Steve Dondley wrote:
I'm experimenting with Apache Solr and Dovecot. As far as I can tell, I have dovecot working with Apache Solr as demonstrated by this output:
a search text "cash"
- SEARCH 4 8 26 35 45 52 54 55 63 a OK Search completed (0.356 + 0.001 + 0.068 secs).
However, when using the roundcube search bar and search all messages on a single word, it takes about 18 seconds. This seems slow as I only have about 4300 message in all my folders. But I'm not sure as I have nothing to compare it to. This does seem slow. I just searched for a single word on a folder with ~52000 mails and it took about 4 seconds including the time to display the resulting list of ~600 mails in roundcube.
Searching directly via imap is way faster: b OK Search completed (0.149 + 0.000 + 0.120 secs).
Not much i can help besides it should be faster i think.
Does you server have enough ram?
Whats your dovecot configuration? You can get that with doveconf -n
Is there a way I can test whether roundcube is using solr to perform searches? Roundcube uses the imap search provided by dovecot so if dovecot is using solr, roundcube does too.
You could tcpdump the connection between dovecot and solr while searching in roundcube, this would tell you if dovecot really searches with solr.
Christian Kivalo
Does you server have enough ram?
I think this may be the issue. I only have 1 GB of ram on the machine and I was just reading a blog post recommending at least 4 GB. I think what I'll do is set up a separate instance for solr and use that instead of running it on the same machine as dovecot.
Thanks for your feedback.
OK, I got solr working on a new virtual machine with a healthier 4 GB of ram. Initially, I experienced the same slowness as before as on the 1 GB machine. I went back and reviewed the documentation at https://wiki.dovecot.org/Plugins/FTS/Solr and realized that I missed a critical step configuring solr with the proper xml config files.
After doing this, the search time is well below one second now.
On 2021-04-05 06:12 AM, Steve Dondley wrote:
Does you server have enough ram?
I think this may be the issue. I only have 1 GB of ram on the machine and I was just reading a blog post recommending at least 4 GB. I think what I'll do is set up a separate instance for solr and use that instead of running it on the same machine as dovecot.
Thanks for your feedback.
On 2021-04-05 07:49 AM, Steve Dondley wrote:
OK, I got solr working on a new virtual machine with a healthier 4 GB of ram. Initially, I experienced the same slowness as before as on the 1 GB machine. I went back and reviewed the documentation at https://wiki.dovecot.org/Plugins/FTS/Solr and realized that I missed a critical step configuring solr with the proper xml config files.
After doing this, the search time is well below one second now.
I just want to document for others that might stumble on this that I switched dovecot to use the local 1 GB machine solr installation and the search was just as quick as using solr on the 4 GB machine. Note that the 1 GB machine is very lightly loaded, however.
On 2021-04-05 06:12 AM, Steve Dondley wrote:
Does you server have enough ram?
I think this may be the issue. I only have 1 GB of ram on the machine and I was just reading a blog post recommending at least 4 GB. I think what I'll do is set up a separate instance for solr and use that instead of running it on the same machine as dovecot.
Thanks for your feedback.
participants (2)
-
Christian Kivalo
-
Steve Dondley