I need some advice to improve my hMailServer performance

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-23 04:27

Hello guys,

First let me say that I love this soon-to-be open source application once again :)

I'm running few instances of hMailServer 5.3.3 - Build 1879 in production and I've been using hMailServer for at least 2-3 years now. I would like, if possible, to hear how you guys have it setup to get better performance out of it. I've been basically forced to drop hMailServer and replace them with Ubuntu instances in a couple locations. The main reason being performance... hMailServers (2GB RAM 2CPUs 3.2GHz in a RAID10 array) are incapable of keeping up with the load for not more than 25 clients. I run Roundcube as front-end webmail in a separate webserver box and my hMailServers are completely dedicated to do the back-end work. I don't have indexing enabled and from what I've read in the board my configuration is pretty much optimized. The main slow down comes from queries (searches) from Roundcube. Searching for e-mails in a folder with no more than 3000 e-mails takes a good 3-4 seconds to give me a result and the server's CPUs spikes to 50-60% ... this ain't terribly bad when there is just a single employee on the Webmail. Now, when I have a couple of users syncing IMAP accounts in their client application and few others (10-15) using the Webmail, hMailserver slows down noticeably. Searches will take 20+ seconds to return results and the CPU load in the system tops the 100%... obviously slowing down every other transaction in my servers. These are all VMs hMailservers by the way. What saddens me the most is that Ubuntu VMs with half of the RAM (1GB and a single CPU) are capable of handling the same (if no more) load and the CPU don't even hit the 10% mark. To fulfill my misery these Ubuntu servers are hosting my back-end email servers as well as the front-end Roundcube Webmail on the same VM hence they are taking a greater load... even though, search results are instant and CPU usage is very low compared to hMailserver.

Could you guys comment about (out of the top of your head) why is it that my hmailServers are performing so poorly compared to Ubuntu Postfix+Dovecot+amavis-new+spamassasin+clamav+razor?

This is honestly bothering me and I would like to keep hMailserver around because I love its simplicity and structure!

Cheers,

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-23 06:39

Howdy. Well hmail has been back to open source for over a year & 1/2 now since 1st 5.4 alpha but yeah it's not officially released although source is & has been available.

You really want indexing enabled if using roundcube assuming your hardware can handle it especially since the recent 'quickindex' changes that seem to cut down the cpu usage of scanning & adding new messages to the index with minimal risk of performance loss. Check out the experimental builds:
http://www.hmailserver.com/forum/viewto ... 10&t=21420
Don't let the experimental name scare you off, many of us have been running them production for a long time now.

If you want to read some of the history on what brought quickindex around read this thread:
http://www.hmailserver.com/forum/viewto ... 10&t=21574

You might try enabling persistent connections in roundcube db config.

I swore there was something about default sort in roundcube that was faster but heck if I can recall now so maybe I'm thinking of something else in which case ignore that. lol

Make sure roundcube caching is disable if you have indexing enabled in hmail.

Try setting imap delimiter in roundcube. (not sure it really helps much at all but if you know delim why not set it vs letting it try to detect)

Also on performance tab, make sure caching is enabled & set TTL high as you can live with. I think I keep mine at like 3600 seconds & always get hit rates of like 95-98%

Btw please tell me you're not using the built-in mssql ce database.. I use mysql & am generous with settings to give it enough ram to cache queries but anything is better than mssql ce which is really just meant for eval/testing or super light use.

Guess those are a few things off top of my head.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-23 17:21

Hi Bill,

Well, 5.4-B2012021601 definitely helped here. Isn't the latest version 5.4-B2012022101?

I have enabled hMailServer message indexing as suggested. My Roundcube settings were all fine as far as I could tell so no modification was required:

$rcmail_config['imap_delimiter'] = '.';
// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
$rcmail_config['imap_cache'] = '';
// Enables messages cache. Only 'db' cache is supported.
$rcmail_config['messages_cache'] = false;

I'm not using built-in database. I'm on MySQL Server version: 5.5.18 and I believe I've been generous with mysql settings for my current setup...

default-storage-engine=InnoDB
max_connections=100
query_cache_size=0M
table_cache=1024
table_open_cache =64
tmp_table_size=64M
thread_cache_size=1024
innodb_buffer_pool_size=128M
innodb_additional_mem_pool_size=10M
innodb_log_file_size=10M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50
innodb_thread_concurrency =32
query_cache_type=0
no-auto-rehash

In 30 days mysql service:

1.3 k The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read
3 The number of times a row lock had to be waited for

I did notice that syncing IMAP accounts from a client app was noticeably faster now. Also, for the first time my Roundcube shorting is working without delays...

Before, if I had let's say a folder with 3000 e-mails and List Option/ short column was set to 'Arrival Date' for example, clicking the folder gave delays while shorting so it was taking from 5-10 seconds to access a folder if I had a short column option defined to anything but 'NONE'; now it is instant again!

Search queries in folders with 3000+ emails gets me results in 2-3 seconds too although CPUs spike to 60-70% still during some queries. I understand this is a VM and that in most cases you want to assign a single CPU to your VM, assigning a second CPU should only be considered in very specific scenarios per vmware documentation... I had no options but to add a second CPU to this VM since it was slowing to a crawl before, yet I do not believe that a single CPU will bring improved performance to my install...

I'm planning on bringing back one of these hmailservers again tonight after employees are gone to test it in a real production environment.

I can certainly say that there were improvements after the latest update.

Any other suggestion?

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 00:38

Bill, the main problem here is the way search queries are handled by hMailServer. Doing just simple browsing on the Webmail client does not seem to be an issue. Now when running a search hmailserver will tax badly on the CPU. I believe it does not use the indexing to provide search results...

I made a video that I would like you share with you. Where can I send you the download link to?

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 01:08

I believe you but not sure it is hmail issue. I mean there are too many variables at play like how the client is asking for the results & which field you are sorting by etc. Have you tried other email clients such as thunderbird outlook or other webmails?
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 01:26

Bill48105 wrote:I believe you but not sure it is hmail issue. I mean there are too many variables at play like how the client is asking for the results & which field you are sorting by etc. Have you tried other email clients such as thunderbird outlook or other webmails?
Bill
I do believe it is the way hmailserver handles the search query. Client applications have their own indexing to do shorting and searches so the query is not passed over to the server, instead they are resolved locally. Outlook, Thunderbird, Apple Mail, Sparrow and even outlook express do this. Please, don't let me down here. Can I send you the download link?

User avatar
mattg
Moderator
Moderator
Posts: 20000
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: I need some advice to improve my hMailServer performance

Post by mattg » 2012-05-25 01:55

when you reach 5 posts you can PM Bill

Doesn't mean that he will take any notice or watch the video/ though.
Which web mail client?
Have you tried other webmail clients?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 02:29

mattg wrote:when you reach 5 posts you can PM Bill

Doesn't mean that he will take any notice or watch the video/ though.
Which web mail client?
Have you tried other webmail clients?
Hi mattg, thanks for jumping in. I have tried Squirrel Mail and Roundcube. I do not have the problem if customers use a client application because there is a local index created in the client application. This is not a "problem" I'm having alone. I can assure you this is happening to every single other hMailServer user out there. I have at the moment 6 hMailServer in production, had 8 but I had to move a couple of them to linux because of this very issue.

One of these hMailServer is carrying over 1.2 million e-mails for archiving proposes. There are accounts with folders holding 30-50 thousand emails that they can't afford to get rid of because of business policies. Searching these folders will take a long time and have a huge impact on the server (with the assumption that it won't time out because I have configured it to prevent that from happening).

The video shows an hmailserver with Roundcube front-end, same hmailserver with Squirrel Mail and a Ubuntu server... running a search query in a folder with 5000 e-mails... that's pretty much it.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 07:00

yoni5002 you can post it on youtube & pm/post link if you want but not sure what it'll tell me except people are trying to use webmail for something it isn't really designed for. Not sure why mail server on linux would be much different than hmail unless there is a difference in settings, search that is being done etc. I covered about all I can think of & suggest. Perhaps you are just expecting too much out of. Most likely it is what it is if you've gone over it all. A good one to step in might be dzekas if he's around. With his knowledge of webmail & IMAP maybe he can narrow down the specific reason one is performing better than another. But like I said possible you're not comparing apples to apples. Say for example nix uses less CPU but takes 10x as long for the search, that's not a fair comparison as one might be optimized to favor speed vs cpu usage or vice versa. Or possible that the webmail is adjusting/detecting settings of the mail server's capabilities (for example if you uncheck the imap sort box on advanced under imap hmail changes advertised capabilities & makes a HUGEEEEEEEE difference in speed & cpu usage. Is that checked or not on yours?). Something else that can bite you is scripting or rules or who knows what all could potentially be different between hmail on doze & nix mail. Possibilities are almost endless.

Btw if you really believe normal email clients are faster/better due to their own indexing/caching then disable hmail's indexing & enable roundcubes own indexing & there you go. You just shifted work from hmail to web server and php & can say 'hmail uses so much less cpu that way'. Well DUH. lol
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 07:59

Hi Bill,

I really appreciate all your help and suggestions. I love hMailserver with passion and I believe it is a very fine piece of software. I wouldn't even mind paying for it since it brings huge value to my deployments. What I'm trying to share here is something that has been bothering me for a long time. I can reproduce this "issue" on every single installation and I bet you can too.

My comparison is fair enough... Linux box 1GB RAM 1 CPU running back-end mail services and front-end webmail (Roundcube) - hMailServer 2GB RAM 2 CPUs running as a back-end server only. Browsing and moving from folder to folder is fast in both systems. The slow down in hMailServer happens only when running searches. Like I said, 10 active users searching for e-mails (Subject and From only) will cause hMailServer to max out my CPUs. Please, pretty please, I beg you to try it for yourself if you have the time and energy to test what I'm sharing here. I'm certainly sure you will be able to replicate this "issue" if you just try it. On the other hand the Linux box handles the search instantly and the CPU usage is almost unnoticeable. There is gotta be something in the way hMail is handling these queries that can be certainly optimized. I'm only trying to make sense of something that I'm unable to correct myself hence I came here with the idea that I would be heard and helped just as you guys have done.

There is no difference in the way the webmail has been configured in the Linux box and my Windows + hMailServer. The webmail application is only a front-end IMAP client and the real work happens behind the scene (back-end server). The video could honestly give you an idea of what I' trying to describe here. I didn't want to upload it to youtube because it exposes my personal site but I will upload it now.

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 08:19

Alright, check it out here: http://www.youtube.com/watch?v=uxZFtYxi ... e=youtu.be

I will have them use an email client application instead because as it is now I will end up just having to replace more servers and that's costly in time and workload... That might be a simpler solution (in reference to email client app).

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 15:28

yoni5002,
You say there is no difference yet you say roundcube does not run on same box in windows scenario.. I'm not being difficult but consider what you are saying. There obviously are differences. ;)

As far as youtube, you post it & pick option that only people with URL can view it. Then you pm that to me. Then no one can see it unless you send them a link..

What you should look at are the email logs for 1 IMAP session. Compare the commands sent by each client (roundcube) to each server. They might not be the same. At least that will confirm if the client side is changing based on server or not.

Also like I said before turn off indexing in hmail & try RC's indexing/caching & see the difference. And did you verify if SORT option is enabled in hmail? Try it both on & off & compare.

Anyway I know hmail has some very tight loops in places & some of the SQL could be optimized a bit (look at the difference the quickindex stuff made) so if we worked on the loops & sql a bit we could prolly optimized some but to 99% of us out there we might not see the difference to bother spending the time.

Check the above & get back to me.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 15:49

yoni5002. Did some testing with roundcube & hmail here. On dormant box with 5800 messages in Spam folder (as in not accessed recently) hmail used virtually 0 cpu (at least not enough to tell when search started or stopped) but it took like 40 seconds to give a result ON FIRST SEARCH. On every search after the results came back in 2-3 seconds but cpu spiked. The spike wasn't huge but I could definitely tell where search was happening. So my guess is that windows file caching is coming into play. That'd explain what you are seeing. Since hmail only indexes common headers if you request "Search entire message" then the file contents of every email needs to be read in. If you search for common headers file does not need to be read it, the index is used. Have you tried searches on each with & without 'all' being selected?
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

rolaids0
Normal user
Normal user
Posts: 150
Joined: 2010-04-27 02:03
Location: Florida
Contact:

Re: I need some advice to improve my hMailServer performance

Post by rolaids0 » 2012-05-25 16:11

I apologize if I missed it, but where is the DB server for Hmail housed? How is dovecot configured? What file system is being used on Linux to store the mail files? I may have missed it in your video, but in my testing to get to the level of CPU usage you are seeing I had to check all options in the search box (Subject, Sender, Recipient, Copy, Bcc, Entire Message) in RC. All but Entire Message incur very little CPU usage.

From looking at the data stream (logs) when you perform a header search (From, Subject, etc) this uses the index within MySQL. When doing a search of the body (full text) hmail has to open every message to locate the info. My thinking here is maybe dovcot is storing the body data in some indexed field in memory.

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 21:20

You say there is no difference yet you say roundcube does not run on same box in windows scenario.. I'm not being difficult but consider what you are saying. There obviously are differences.
:) That's fair to say. I moved my Roundcube off of that box with the hope to improve or at least reduce the load. It is the same regardless if it is running on the same box or not. Actually in that video you watched Squirrel Mail was running on the same hmailserver box yet the searching is CPU intensive :)

Roundcube relies on IMAP SORT so yeah, it is enabled on the server side.
Also like I said before turn off indexing in hmail & try RC's indexing/caching & see the difference. And did you verify if SORT option is enabled in hmail? Try it both on & off & compare.
With hmail SORT I get better results. Still the same when searching for e-mails CPU wise. I'm searching only HEADER FROM and i have even recreated a new database, I have synced the old one. I do not have errors in my logs...

Code: Select all

"IMAPD"	904	30	"2012-05-25 15:11:46.171"	"192.168.1.3"	"RECEIVED: A0003 SELECT INBOX"
"IMAPD"	904	30	"2012-05-25 15:11:46.171"	"192.168.1.3"	"SENT: * 4588 EXISTS[nl]* 0 RECENT[nl]* FLAGS (\Deleted \Seen \Draft \Answered \Flagged)[nl]* OK [UIDVALIDITY 1337955019] current uidvalidity[nl]* OK [UNSEEN 7038] unseen messages[nl]* OK [UIDNEXT 7039] next uid[nl]* OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited[nl]A0003 OK [READ-WRITE] SELECT completed"
"IMAPD"	164	30	"2012-05-25 15:11:46.187"	"192.168.1.3"	"RECEIVED: A0004 SORT (ARRIVAL) UTF-8 ALL OR HEADER SUBJECT {4}"
"IMAPD"	164	30	"2012-05-25 15:11:46.187"	"192.168.1.3"	"SENT: + Ready for additional command text."
"IMAPD"	904	30	"2012-05-25 15:11:46.187"	"192.168.1.3"	"RECEIVED: demo HEADER FROM {4}"
"IMAPD"	904	30	"2012-05-25 15:11:46.187"	"192.168.1.3"	"SENT: + Ready for additional command text."
"IMAPD"	164	30	"2012-05-25 15:11:46.187"	"192.168.1.3"	"RECEIVED: demo"
"IMAPD"	164	30	"2012-05-25 15:11:48.187"	"192.168.1.3"	"SENT: * SORT 1845 4354 2543 1455 3572 [nl]A0004 OK Search completed"
"IMAPD"	904	30	"2012-05-25 15:11:48.203"	"192.168.1.3"	"RECEIVED: A0005 FETCH 4588 (UID)"
"IMAPD"	904	30	"2012-05-25 15:11:48.203"	"192.168.1.3"	"SENT: * 4588 FETCH (UID 7038)"
"IMAPD"	904	30	"2012-05-25 15:11:48.203"	"192.168.1.3"	"SENT: A0005 OK FETCH completed"
Am I the only one experiencing this?

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 21:29

rolaids0 wrote:I apologize if I missed it, but where is the DB server for Hmail housed?
The database is housed on the same hMailServer box.
How is dovecot configured? What file system is being used on Linux to store the mail files? I may have missed it in your video, but in my testing to get to the level of CPU usage you are seeing I had to check all options in the search box (Subject, Sender, Recipient, Copy, Bcc, Entire Message) in RC. All but Entire Message incur very little CPU usage.
Are you referring in your search results to hMailServer or dovecot?
From looking at the data stream (logs) when you perform a header search (From, Subject, etc) this uses the index within MySQL. When doing a search of the body (full text) hmail has to open every message to locate the info. My thinking here is maybe dovcot is storing the body data in some indexed field in memory.
That sounds more like it. Note that I'm not searching the body. I'm searching only for Subject From...
"RECEIVED: demo HEADER FROM {4}"

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2012-05-25 21:30

In full text IMAP search only one server can beat correctly configured dovecot. If your search is only in headers, hmailserver indexing might help.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 21:35

dzekas wrote:In full text IMAP search only one server can beat correctly configured dovecot. If your search is only in headers, hmailserver indexing might help.
dzekas: You see anything out of ordinary for his IMAP logs that jumps out that might be of concern to performance? Or what needs to be done on hmail to help?
thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 21:44

Looking at the time stamps I assume the spike is seen after:

Code: Select all

"IMAPD"   164   30   "2012-05-25 15:11:46.187"   "192.168.1.3"   "RECEIVED: demo"
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-25 21:45

dzekas wrote:In full text IMAP search only one server can beat correctly configured dovecot. If your search is only in headers, hmailserver indexing might help.
Thanks dzekas, I'm honestly trying to figure out the problem here and I do not intend to bash hmailserver or compare its performance with dovecot in this case. hMailServer overall performance is really good and that's all that matters to me. What I'm trying to find out here is a fix for these search queries because they are chocking my hMail installations... In worst case scenario I can force the customer to go with an email client application... but it might also be possible that we could find the culprit of this inconvenient high CPU usage when searching for e-mails.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2012-05-25 22:11

IMAP logs show mailbox sorted by subject. They don't show search commands. If you sort by subject, you must enable indexing in hmailserver or you hit hardcoded PHP timeouts in PHP webmails on anything larger than 10k mailbox and you have serious degradation somewhere between 2.5k and 5k mailbox.

Dovecot and Cyrus have edge over other IMAP servers in full text search as they have special indexes. In dovecot indexing is done on demand. In Cyrus it is persistent. You must knowingly enable those indexes to use them and they are not enabled by default on Debian/Ubuntu.

Maybe Bill's suggestion about turning off hmail indexes works better for Roundcube. My tests never used internal cache as SquirrelMail 1.4 does not have one.
Last edited by dzekas on 2012-05-25 22:21, edited 3 times in total.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 22:15

yoni5002,
I'm doing testing here & while I see a spike during search it's not very much on my core i5 server. And search times are around 2 sec with 5700 messages. Looks like you see about the same in your logs.

Search on From:

Code: Select all

"IMAPD"	5136	231474	"2012-05-25 16:07:41.532"	"192.168.3.111"	"RECEIVED: A0004 SORT (ARRIVAL) UTF-8 ALL HEADER FROM {1}"
"IMAPD"	5136	231474	"2012-05-25 16:07:41.532"	"192.168.3.111"	"SENT: + Ready for additional command text."
"IMAPD"	5136	231474	"2012-05-25 16:07:41.532"	"192.168.3.111"	"RECEIVED: @"
"IMAPD"	5136	231474	"2012-05-25 16:07:43.951"	"192.168.3.111"	"SENT: * SORT 1 <SNIP!> 5716[nl]A0004 OK Search completed"
Dunno seems yer splitting hairs a bit to be concerned with search results in 2 sec of 1000's of messages. :D

Btw can you show us your table layout for the hmail db or at least tell us which tables are indexed? I think there are a few that are not indexed by default that can help cut cpu & make it faster at expense of some mem used by db.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2012-05-25 22:26

Bill48105 wrote:yoni5002,
I'm doing testing here & while I see a spike during search it's not very much on my core i5 server. And search times are around 2 sec with 5700 messages. Looks like you see about the same in your logs.

Search on From:

Code: Select all

"IMAPD"	5136	231474	"2012-05-25 16:07:41.532"	"192.168.3.111"	"RECEIVED: A0004 SORT (ARRIVAL) UTF-8 ALL HEADER FROM {1}a
SORT (ARRIVAL) has smallest impact on disk I/O. server does not have to read any email. Try sort (subject) or sort (date). Usually sort (arrival) on INBOX is useless as you get same results in unsorted mailbox.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 22:35

dzekas wrote:
Bill48105 wrote:yoni5002,
I'm doing testing here & while I see a spike during search it's not very much on my core i5 server. And search times are around 2 sec with 5700 messages. Looks like you see about the same in your logs.

Search on From:

Code: Select all

"IMAPD"	5136	231474	"2012-05-25 16:07:41.532"	"192.168.3.111"	"RECEIVED: A0004 SORT (ARRIVAL) UTF-8 ALL HEADER FROM {1}a
SORT (ARRIVAL) has smallest impact on disk I/O. server does not have to read any email. Try sort (subject) or sort (date). Usually sort (arrival) on INBOX is useless as you get same results in unsorted mailbox.
Thanks that must be a roundcube option, don't recall setting it but will do some more testing.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 22:38

Ok here is search on subject sorted by subject:

Code: Select all

"IMAPD"	3236	232598	"2012-05-25 16:35:54.443"	"10.1.1.11"	"SENT: * 5723 EXISTS[nl]* 0 RECENT[nl]* FLAGS (\Deleted \Seen \Draft \Answered \Flagged)[nl]* OK [UIDVALIDITY 1291143134] current uidvalidity[nl]* OK [UNSEEN 6945] unseen messages[nl]* OK [UIDNEXT 12668] next uid[nl]* OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited[nl]A0003 OK [READ-WRITE] SELECT completed"
"IMAPD"	4012	232598	"2012-05-25 16:35:54.443"	"10.1.1.11"	"RECEIVED: A0004 SORT (SUBJECT) UTF-8 ALL HEADER SUBJECT {4}"
"IMAPD"	4012	232598	"2012-05-25 16:35:54.443"	"10.1.1.11"	"SENT: + Ready for additional command text."
"IMAPD"	4012	232598	"2012-05-25 16:35:54.444"	"10.1.1.11"	"RECEIVED: spam"
"IMAPD"	4012	232598	"2012-05-25 16:35:57.516"	"10.1.1.11"	"SENT: * SORT 3639 <SNIP!> 5356[nl]A0004 OK Search completed"
So 3 sec search vs 2 & maybe a little more cpu usage but still not much IMO. I mean the server IS doing work after all. :D
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2012-05-25 22:51

Bill48105 wrote:So 3 sec search vs 2 & maybe a little more cpu usage but still not much IMO. I mean the server IS doing work after all. :D
Bill
SORT SUBJECT
0 messages - 206,18 ms
100 msgs - 257,22 ms
250 msgs - 277,85 ms
500 msgs - 342,33 ms
1000 msgs - 612,50 ms
2500 msgs - 2453,16 ms
5000 msgs - 19100,47 ms
10000 msgs - php timeout
25000 msgs - php timeout
50000 msgs - php timeout

Test results from hmailserver4 without index cache.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-25 23:28

dzekas wrote:Test results from hmailserver4 without index cache.
Cool but what about with index cache enabled?
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-26 00:09

Hey Bill, here...
Attachments
2.png
1.png
sql-result.htm.zip
(2.03 KiB) Downloaded 210 times

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-26 00:10

And here are the tables...
Attachments
3.png
hmailserver tables.png
hmailserver tables.png (2.96 KiB) Viewed 20433 times

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-26 00:31

yoni5002,
Maybe if rolaids0 gets time he'll look over your tables.

I looked at the source code & have a feeling I see where the high cpu is. There are 2 foreach loops which could get tight but also a call to an array sort function. Could add some debug logging to narrow it down some & go from there. If you were willing to live with slower results for lower cpu usage could add some sleeps in there but kinda a kludge.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-26 05:16

yoni5002,
We've been talking about this in IRC. We might be able to modify the code to make use of hmail's indexing for searches on to/from/subject (anything else including entire message would not benefit since those are not stored in the metadata table). Don't get too excited though, this is just very early discussions. Based on some manual queries we're looking at sub 1s results. (To more exact results in the 100th's or even 1000th's of a second!) Keep in mind that is just one part of the process required to search for emails but it looks promising and possibly a way to greatly increase performance for those searches if hmail's indexing is enabled. rolaids0 & I will continue discussions but can't promise much at this point since most of us are content with 2 second search results using 20% of 1 core. ;) Can understand under certain conditions & heavy loads it could be problematic though so we'll see what we can do.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2012-05-26 13:59

Bill48105 wrote:
dzekas wrote:Test results from hmailserver4 without index cache.
Cool but what about with index cache enabled?
http://pastebin.com/W7yj3Xv8

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2012-05-26 18:15

Bill48105 wrote:yoni5002,
We've been talking about this in IRC. We might be able to modify the code to make use of hmail's indexing for searches on to/from/subject (anything else including entire message would not benefit since those are not stored in the metadata table). Don't get too excited though, this is just very early discussions. Based on some manual queries we're looking at sub 1s results. (To more exact results in the 100th's or even 1000th's of a second!) Keep in mind that is just one part of the process required to search for emails but it looks promising and possibly a way to greatly increase performance for those searches if hmail's indexing is enabled. rolaids0 & I will continue discussions but can't promise much at this point since most of us are content with 2 second search results using 20% of 1 core. ;) Can understand under certain conditions & heavy loads it could be problematic though so we'll see what we can do.
Bill
That's awesome, Bill! Thank you so much.

If 20% of 1 core x 20 users you are very soon running out of cores :D

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2012-05-27 03:47

yoni5002 wrote:That's awesome, Bill! Thank you so much.

If 20% of 1 core x 20 users you are very soon running out of cores :D
Like I said don't get too excited, very preliminary at this point. There are things requested years ago that haven't been done. :D But from what I can tell hmail's indexing isn't used for searches which seems silly so might be something we'll look at closer depending on how much work it'll take & how much benefit people will get. We need to review the polls & see where some other long-standing to-do's are too.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-02-27 18:06

Hello!

I have been following this thread as we are slowly moving from Thunderbird "environment" to a web-based office environment.
I have noticed much like yoni5002 and dzekas that searching mails in webmail is very slow on larger inbox.
We are on 5.3.3 and I have not been following the latest development threads.

Therefore I write here to ask if this has been researched further?
We have experienced this problem with group-office and fengoffice webmail software.

The developer at group-office have responded:
Wesley Smits said: 06-07-2012 16:01
Hi Johan,

This is a problem on the mailserver. The mailserver is handling the actual search and is (too) slow to send a response before the javascript timeout.
Index all the mail on the server so it can be searched a lot faster.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: I need some advice to improve my hMailServer performance

Post by dzekas » 2013-02-27 20:03

slingshot wrote:Index all the mail on the server so it can be searched a lot faster.
I know only two IMAP servers that do it. squat index is not something that you can slap on any software without making changes in software itself. hMailServer indexing is sufficient for basic header search. Full text search requires special handling and it has drawbacks on mailboxes that store every email in individual file.

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-02-28 11:59

dzekas: Thank you for responding! It's more than sufficient with Index for the basic headers.
But are there changes made between 5.3.3 and latest build regarding this.
Because as of now it still takes me around 5 seconds to search only for sender address.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2013-02-28 20:38

slingshot wrote:dzekas: Thank you for responding! It's more than sufficient with Index for the basic headers.
But are there changes made between 5.3.3 and latest build regarding this.
Because as of now it still takes me around 5 seconds to search only for sender address.
You're going to complain about 5 second search time? Have you searched for sender address in Outlook when messages are stored locally in PST? Uncached searches in my inbox with 10,000 emails takes about 2 minutes on an quad i5 with 16G ram & SSD. Yes once cached searches are more like 5 seconds but wow no way I'd complain about 5 second search results unless you have 100 messages then you need a server upgrade lol

Understand that search speeds depend on many factors including your server cpu/mem/hdd, web & php settings (if you use php such as webmail), email client methods and internet speed for non-webmail on top of hmail & sql settings. hmail's indexing helps a ton if the client does search that supports it such as finding sender address but does not help with full body searches since those are not indexed. But if your server has enough memory those EML files can be cached & REALLY speed up subsequent searches aside from indexing. So if your later searches are not faster than your 1st then likely you need to upgrade your server. Upgrading mine from dual core2 to quad i5 and from 4GB DDR2 to 16GB DDR3 and mirrored SATA3 drives made a WORLD of difference in speed of everything, especially roundcube webmail and searches, especially cached searches. Tweaking apache & php made a world of difference for webmail speeds as well. And adjusting mysql's settings for higher performance settings made a huge difference in speeds. (Set mysql to mini & see how crappy it performs with many users)

In terms of what's changed between 5.3.x & 5.4, yes there were some indexing tweaks that were done but they mainly reduce server load during indexing of messages (mainly during reindexing really) but not sure they'd really help speed up searches besides fact server is using less CPU less often than before if quickindexing is enabled.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-04-10 16:15

Thank you so much for your respones Bill48105!

I will attack this issue from three different angles.
  • My main problem is that the webmail times-out on the first search leaving me with no other option than to reload the whole webmail page.
    So I have asked the webmail developers how to exstend the time before the search timeout.
  • Secondly as you say on the second and third search the data has been cached to the server and the search goes quicker.
    Although I have a 8GB ram machine it utilizes only 4GB, is there any way to force hmail to reserve more memory for caching files?
    The only settings i can find and relate is a cache time settings, on how long the cache should be held.
  • Third, the emails are stored on a network storage, to speed up the handeling it would be perferrable that in the next setup have the emails on local disks of the machine to minimize network utilization for getting the file information.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: I need some advice to improve my hMailServer performance

Post by Bill48105 » 2013-04-10 17:49

It's not hmail that's caching it's Windows caching the EML files which need to be read in for email info during searching if not indexed. And yes local should be faster than network reducing your times
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-04-11 10:12

If anyone else has problems with timeouts in websearch I can say that a single change in the php.ini file made it work for me.
I change the value of max-execution-time from its default 30 to 60 seconds. This may differ depending on how your webmail is coded but I thought it would be a good idea to post it if anyone has interest in making it work properly.

http://www.php.net/manual/en/info.confi ... ution-time

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-12-17 23:44

This is the IMAP command sent to the server from the webclient:

Code: Select all

Selecting IMAP mailbox INBOX
get_message_headers_set(0, 50, ARRIVAL , 1, OR OR FROM "pernilla" SUBJECT "pernilla" TO "pernilla")
server_side_sort(ARRIVAL, 1, OR OR FROM "pernilla" SUBJECT "pernilla" TO "pernilla")
Count uids: 65
INBOX
GO_Email_Model_ImapMailbox:INBOX
Script running at [shutdown] for 1387292712.1556ms
It's not in text search, would it be possible to get a faster response on this by indexing the database somehow?
Like in the bottom of this help page where an index for faster processing is suggested:
http://www.hmailserver.com/documentatio ... rguide_dds
Index suggestion for the Data directory synchronizer was:

Code: Select all

CREATE INDEX idx_custom_hm_messages_messagefilename ON hm_messages (messagefilename)

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: I need some advice to improve my hMailServer performance

Post by percepts » 2013-12-17 23:51

see responses in following topic

http://www.hmailserver.com/forum/viewto ... =7&t=25770

This IMAP message indexing creates specially indexed rows in hm_message_metadata which IMAP calls to hmail must be using for performance if you have it enabled.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: I need some advice to improve my hMailServer performance

Post by percepts » 2013-12-18 00:33

And note that in the topic I just gave you a link to, using indexing is working great on a folder with 40,000 messages in it.

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2013-12-19 01:06

Thank you very much seems to work out quite well! :)

yoni5002
Normal user
Normal user
Posts: 36
Joined: 2010-07-13 15:04

Re: I need some advice to improve my hMailServer performance

Post by yoni5002 » 2014-07-25 23:25

Just in case anyone is interested, we finally "solved" this issue by implementing hmail_search (MyRoundcube Plugin).

Basically, we are able to index 9000+ messages every 460 seconds. Once the initial indexing has been done, it only has to index new messages (received by SMTP) and messages stored by IMAP (f.e. outgoing messages in Sent folder). The indexing task is scheduled when a user logs in at least once. Inactive accounts are not indexed.

There is a downside if it can be called that: The database size grows noticeable. That's the price. In return, we have beaten dovecot searches :D; we can search mailboxes with 3,000-30,000 messages (entire messages - Subject, FROM, TO, Cc, Bcc, Body) and we get instantaneous responses. No delays whatsoever and the CPU usage is close to nothing. With 1.1 million messages, the database is 3.71GB in size. So smaller instances with 100,000 - 200,000 messages should see a database @300-600MB in return for a lighting fast search on webmail.

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2015-02-09 10:19

I have tried to get hmail_search to implement the faster index for another webmail. Would that be possible? I just figured out the hmail_search plugin is MyRC$ 6 so I want to make sure it at least in teory should work before buying.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: I need some advice to improve my hMailServer performance

Post by percepts » 2015-02-09 10:25

Ask MyRoundcube

slingshot
New user
New user
Posts: 25
Joined: 2013-02-27 17:59

Re: I need some advice to improve my hMailServer performance

Post by slingshot » 2015-02-11 10:26

I got an response from myRoundCube:
-------------------------------------

That's for hMailServer + Roundcube only!

Rosali <dev-team@myroundcube.com>
--
MYROUNDCUBE DEV TEAM

Agostino
New user
New user
Posts: 17
Joined: 2014-01-19 19:29

Re: I need some advice to improve my hMailServer performance

Post by Agostino » 2019-07-02 17:35

Hi guys
i've read with interest the conversation about the perfomance issue in search on hmailserver and cause i've the same problems i want to try the hmail_search plugin on Roundcube but searching on Google I can't find anything.
Where is hmail_search plugin? Or are there other solution about search performance issue on hmailserver?
Thanks in advance!

palinka
Senior user
Senior user
Posts: 965
Joined: 2017-09-12 17:57

Re: I need some advice to improve my hMailServer performance

Post by palinka » 2019-07-02 21:49

I couldn't find it either and I'd be very interested in seeing if it could work.

User avatar
SorenR
Senior user
Senior user
Posts: 3169
Joined: 2006-08-21 15:38
Location: Denmark

Re: I need some advice to improve my hMailServer performance

Post by SorenR » 2019-07-02 22:21

My guess is that you will not find it. I assume it was part of the now dead and buried "MyRoundcube" project that for the most part tried to capitalize on open source software.

I believe it was Rosali that purged the Internet for all things "MyRoundcube", website, forum, github, the works...

A lot of people had purchased a product that ended up being shut down with no back-end licensing server. If I were Rosali I would "delete" myself too :wink:
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

palinka
Senior user
Senior user
Posts: 965
Joined: 2017-09-12 17:57

Re: I need some advice to improve my hMailServer performance

Post by palinka » 2019-07-02 23:12

SorenR wrote:
2019-07-02 22:21
My guess is that you will not find it. I assume it was part of the now dead and buried "MyRoundcube" project that for the most part tried to capitalize on open source software.

I believe it was Rosali that purged the Internet for all things "MyRoundcube", website, forum, github, the works...

A lot of people had purchased a product that ended up being shut down with no back-end licensing server. If I were Rosali I would "delete" myself too :wink:
Figures...

This is something I've been thinking about lately using the same technique. So it was already on my mind when this topic was resurrected.

Even better would be if some friendly coder made a custom build that redirected imap searching to a new table containing message content stripped of html elements. Hmmmm.... :mrgreen:

User avatar
SorenR
Senior user
Senior user
Posts: 3169
Joined: 2006-08-21 15:38
Location: Denmark

Re: I need some advice to improve my hMailServer performance

Post by SorenR » 2019-07-02 23:29

palinka wrote:
2019-07-02 23:12
SorenR wrote:
2019-07-02 22:21
My guess is that you will not find it. I assume it was part of the now dead and buried "MyRoundcube" project that for the most part tried to capitalize on open source software.

I believe it was Rosali that purged the Internet for all things "MyRoundcube", website, forum, github, the works...

A lot of people had purchased a product that ended up being shut down with no back-end licensing server. If I were Rosali I would "delete" myself too :wink:
Figures...

This is something I've been thinking about lately using the same technique. So it was already on my mind when this topic was resurrected.

Even better would be if some friendly coder made a custom build that redirected imap searching to a new table containing message content stripped of html elements. Hmmmm.... :mrgreen:
Windows already have indexing, even capable of full text searches... Perhaps hMailServer could be made to use that for searches beyond "From", "To" and "Subject" :idea:
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

palinka
Senior user
Senior user
Posts: 965
Joined: 2017-09-12 17:57

Re: I need some advice to improve my hMailServer performance

Post by palinka » 2019-07-02 23:32

SorenR wrote:
2019-07-02 23:29
Windows already have indexing, even capable of full text searches... Perhaps hMailServer could be made to use that for searches beyond "From", "To" and "Subject" :idea:
I was actually googling that today. Not that i could actually do anything with that information... :mrgreen: but it's a good idea.

Agostino
New user
New user
Posts: 17
Joined: 2014-01-19 19:29

Re: I need some advice to improve my hMailServer performance

Post by Agostino » 2019-07-03 09:26

Ok, Windows has indexing and "From", "To", "Subject" were stored in db but the search is slow. I have Roundcube + Hmailserver with mySql on a server with Xeon 2.4 and 12Gb Ram with Windows 2012 but now i have 2 minute to search 1.5 gb mailbox. What do you think about? Is there a caching system or some trick to increase the performance? Cause the users complained about the slowness and I don't know if is better to change the webmail or mail system..

palinka
Senior user
Senior user
Posts: 965
Joined: 2017-09-12 17:57

Re: I need some advice to improve my hMailServer performance

Post by palinka » 2019-07-03 13:46

I sent yoni5002 a PM. Who knows if he will even receive a notification since his post is so old, but i asked him to share the plugin. We'll see. I'll update if he responds.

Agostino
New user
New user
Posts: 17
Joined: 2014-01-19 19:29

Re: I need some advice to improve my hMailServer performance

Post by Agostino » 2019-07-04 23:29

Thanks palinka.
But one thing i do not understand: when i'm log into webmail and i do a search, the first query takes 60, 80 or 120 seconds but the following 10 or 15 seconds. If i'm log out and log in in other mail account and i do a search, the same: the first query takes 60, 80 or 120 seconds but the following 10 or 15 seconds.
Is there a caching system in mysql, roundcube or hmailserver? And is there a chance to activate it when the user log in your account?

Post Reply