Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Recommended block size for a mail server file system
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Recommended block size for a mail server file system

Hi,

Do you have experiences on storing emails on a dedicated server? As email size is quite small, so I think a block size of 512 bytes is disk-saving. However, large attachments, 25 MB in example may cause performance issues for write and read. Will it run well when I set that block size on NVMe SSD disk for thousands of users with about 25 MB attachments allowed?

Thanks for reading and answering.

Comments

  • @jar as LET resident "I run e-mail!"

  • emghemgh Member

    I don’t really know, but, if it actually becomes an issue, why not just store attachments seperately with a fitting block size?

    Thanked by 1huymike00
  • tomletomle Member, LIR

    512bytes is trash on most NVMe anyway, go with at least 4k.

    Thanked by 1huymike00
  • @emgh said:
    I don’t really know, but, if it actually becomes an issue, why not just store attachments seperately with a fitting block size?

    Yes, it's advised to store big attachments separately, but email clients like Outlook, Samsung email will convert them to base64 or other formats tied to email content, so there are no way to separate them unless I force users to use in-house email client.

    Thanked by 2emgh jar
  • HxxxHxxx Member

    Ask chatGPT. After this technology release to the main public, there is no point in asking without doing research. GPT4 is able to reason more effectively.

  • What mailbox format are you going to use? Mbox, Maildir? for mbox 1Mb works fine; for Maildir, a smaller value, something closer to your average mail file size

    Thanked by 1huymike00
  • joshnsgjoshnsg Member
    edited March 2023

    Which OS and file system are you using, and are you hosting on your own hardware (in which case SSD longevity might be your concern)?

    Thanked by 1huymike00
  • huymike00huymike00 Member
    edited March 2023

    @RemarkableGuille said:
    What mailbox format are you going to use? Mbox, Maildir? for mbox 1Mb works fine; for Maildir, a smaller value, something closer to your average mail file size

    After many thinks, I decided to choose Dovecot's mdbox with rotate size of 1 MB. This is a high-performance solution, but maybe new problem is that most of MTAs do not recognize dbox format and it will take me time to create microservices to load messages from server's file system to in-house mail client ( I will not load via imap because it's heavy at backend).

    @joshnsg said:
    Which OS and file system are you using, and are you hosting on your own hardware (in which case SSD longevity might be your concern)?

    I will choose XFS and OS support it by default. Do you think it will run well on 64 GB RAM, 4 physical cores and about 4TB HDD with 512 NVMe SSD cache? Since hosting emails does not require high iops like database, I think above server's spec is fine for a few thoudsands of users. Maybe I will upgrade to full NVMe SSD for faster full text search in old emails (assuming indexes are available). This needs to be researched and tested for best performance in product environments.

    Thanks for reading! Any advices are highly appreciated.

  • With XFS on bare metal and modern SSDs, I would agree with @tomle and going with 4k, unless your kernel is capable of supporting larger multiples (in which case you could run a read/write disk benchmark from 4k up to 1MB sample sizes).

    Thanked by 1huymike00
Sign In or Register to comment.