Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2021-02-16 Thread Tellier Benoit
Hello Jean, I do support merging https://github.com/apache/james-project/pull/282 along with https://github.com/apache/james-project/pull/286 as soon as we get a green build. I did finally succeed to run an SMTP benchmark against a simple workload mixing small and big messages, the outcome was

Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2021-02-14 Thread Jean Helou
Hi everyone, In light of benoit's latest comments on the related PRs, I want to report that I spent some time setting up an infra to do benchmarks against a full server (mx only) I'm not an ops at core, I don't know james all that well and spare time is limited and I got sidetracked quite a few

Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2021-01-07 Thread Raphaël Ouazana
Hi, I completely agree with what Matthieu said. Correctness is needed, so we have to fix this issue. But before merging on master and/or deploying this version I would expect some Gatling runs to show which potential performance decrease we can expect on real use cases. Thanks, Raphaël.

Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2021-01-04 Thread Matthieu Baechler
Hi there, Thank you for bringing this topic to the mailing-list. To me safety and correctness is much more important than raw performance so I would like the always-copy implementation to replace the COW version. However, keep in mind that the JMH benchmark figures did not told the full story

Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2020-12-29 Thread Tellier Benoit
Of course. I created https://issues.apache.org/jira/browse/JAMES-3487 Cheers, Benoit Le 29/12/2020 à 15:19, Jean Helou a écrit : >> >> Please note that above 100KB the MimeMessage would be stored on disk, >> thus limiting memory impact (see MimeMessageInputStreamSource). Maybe we >> should

Re: The case of javax.mail MimeMessage CopyOnWrite optimization

2020-12-29 Thread Jean Helou
> > Please note that above 100KB the MimeMessage would be stored on disk, > thus limiting memory impact (see MimeMessageInputStreamSource). Maybe we > should make the threshold configurable, via a system property for instance? > Having the threshold configurable seems like a good idea to me (I

The case of javax.mail MimeMessage CopyOnWrite optimization

2020-12-28 Thread Tellier Benoit
Hello there! We had been discussing on GitHub recently about an optimization in james core around the usage of MimeMessage. Javax.mail MimeMessage is currently used to represent a message of an email as part of the mail processing in James. It is part of the Mail interface (mailet-api). As Mail