Re: Question on Amavis and ramdisk

2017-08-22 Thread Willem Jan Withagen
On 21-8-2017 15:40, RW via freebsd-ports wrote:
> On Mon, 21 Aug 2017 14:47:43 +0200
> Willem Jan Withagen wrote:
> 
>> Hi,
>>
>> In the amavis rc.d file is noted:
>> ""
>> "WARNING: using ramdisk is reported to be unstable and"
>> "thus it is highly recommended to be turned off."
>> ""
>>
>> And this warning seems there since 2012
> 
> 
> 
> Actually it came in with revision 228889 in 2009. The script at
> that point didn't allow for tmpfs and only checks for an existing md
> device before creating a malloc md device (i.e. in unswapable wired
> kernel memory).  IIRC there used to be a warning about this kind of md
> device being able to cause crashes.

Ah, oke,

That I can remember too. But I think that is no longer the case.
Perhaps now with the new rc.d stuff tmpfs is more appropriate.

--WjW


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Question on Amavis and ramdisk

2017-08-21 Thread RW via freebsd-ports
On Mon, 21 Aug 2017 14:47:43 +0200
Willem Jan Withagen wrote:

> Hi,
> 
> In the amavis rc.d file is noted:
> ""
> "WARNING: using ramdisk is reported to be unstable and"
> "thus it is highly recommended to be turned off."
> ""
> 
> And this warning seems there since 2012



Actually it came in with revision 228889 in 2009. The script at
that point didn't allow for tmpfs and only checks for an existing md
device before creating a malloc md device (i.e. in unswapable wired
kernel memory).  IIRC there used to be a warning about this kind of md
device being able to cause crashes.

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Question on Amavis and ramdisk

2017-08-21 Thread Willem Jan Withagen
On 21-8-2017 15:23, Mark Martinec wrote:
> 2017-08-21 14:47 Willem Jan Withagen wrote:
>> In the amavis rc.d file is noted:
>> ""
>> "WARNING: using ramdisk is reported to be unstable and"
>> "thus it is highly recommended to be turned off."
>> ""
>>
>> And this warning seems there since 2012
>>
>> Is this warning still valid?
>> And if YES, could somebody try and enlighten me as to what is unstable
>> on this config?
>>   - Is the ramdisk itself unstable?
>>   - Or is it the fact that upon a crash de ramdisk is lost and email
>> might be lost?
> 
> I don't really know what was the reason for this warning, but I can
> guess that it's because the port creates a mdmfs ram disk of a fixed
> size for the %%AMAVISDIR%%/tmp file system, and any fixed size small
> disk may eventually run out of space, either during some peak mail
> traffic rush-in, of perhaps when soma stale temporary files happen
> to be left undeleted and accumulating, while this goes unnoticed
> for some time.

Oke, so these are the regular sysadmin troubles of a (too) small a disk.
Nothing a good purge can not fix
Full disk might indeed lead to a sort of DOS situation.

> Using tmpfs instead of mdmfs could avoid some of the above concerns
> if you really want to use a ram disk. In my experience with a
> modern host and file systems, especially with SSD, there is no longer
> any substantial speedup by using a ram disk instead, so I don't
> think it is worth sacrificing memory for a ram disk, which could
> better be used by file system caches etc.

' this system runs in VM on KVM in OpenStack.
And one of the bottlenecks is amavis flushing all mail to a disk. And
that pushes the virtual disk to their limit.
Switching some ramdisk on really does help in the load.
>>   - Or is it the fact that upon a crash de ramdisk is lost and email
>> might be lost?
> 
> No, mail should not be lost. Write failures would be noticed and
> a feeding mailer would receive a temporary failure (smtp status 450),
> so mail should stay in the mailer's queue for a later retry.
> But left unattended for days, this would result in mail non-delivery
> notification to the sender.

Right. As far as I know will postfix only note amavis complete if Amavis
has really reported as such, and only then tkae the file from the
waiting queue. So a crash would not result in wrong deliveries.

So perhaps the wording on that message should be less strong and
prohibitive?

--WjW

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Question on Amavis and ramdisk

2017-08-21 Thread Mark Martinec

2017-08-21 14:47 Willem Jan Withagen wrote:

In the amavis rc.d file is noted:
""
"WARNING: using ramdisk is reported to be unstable and"
"thus it is highly recommended to be turned off."
""

And this warning seems there since 2012

Is this warning still valid?
And if YES, could somebody try and enlighten me as to what is unstable
on this config?
  - Is the ramdisk itself unstable?
  - Or is it the fact that upon a crash de ramdisk is lost and email
might be lost?


I don't really know what was the reason for this warning, but I can
guess that it's because the port creates a mdmfs ram disk of a fixed
size for the %%AMAVISDIR%%/tmp file system, and any fixed size small
disk may eventually run out of space, either during some peak mail
traffic rush-in, of perhaps when soma stale temporary files happen
to be left undeleted and accumulating, while this goes unnoticed
for some time.

Using tmpfs instead of mdmfs could avoid some of the above concerns
if you really want to use a ram disk. In my experience with a
modern host and file systems, especially with SSD, there is no longer
any substantial speedup by using a ram disk instead, so I don't
think it is worth sacrificing memory for a ram disk, which could
better be used by file system caches etc.


  - Or is it the fact that upon a crash de ramdisk is lost and email
might be lost?


No, mail should not be lost. Write failures would be noticed and
a feeding mailer would receive a temporary failure (smtp status 450),
so mail should stay in the mailer's queue for a later retry.
But left unattended for days, this would result in mail non-delivery
notification to the sender.

  Mark
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Question on Amavis and ramdisk

2017-08-21 Thread Willem Jan Withagen
Hi,

In the amavis rc.d file is noted:
""
"WARNING: using ramdisk is reported to be unstable and"
"thus it is highly recommended to be turned off."
""

And this warning seems there since 2012

Is this warning still valid?
And if YES, could somebody try and enlighten me as to what is unstable
on this config?
  - Is the ramdisk itself unstable?
  - Or is it the fact that upon a crash de ramdisk is lost and email
might be lost?

Thanx,
--WjW
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"