<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Luca Arcara on Medium]]></title>
        <description><![CDATA[Stories by Luca Arcara on Medium]]></description>
        <link>https://medium.com/@lucaarcara?source=rss-7f1444bd02da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SKx3IIviEdYYlVPFnqldFQ.jpeg</url>
            <title>Stories by Luca Arcara on Medium</title>
            <link>https://medium.com/@lucaarcara?source=rss-7f1444bd02da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:23:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lucaarcara/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sizing Zimbra Infrastructure — Part 2]]></title>
            <link>https://medium.com/@lucaarcara/sizing-zimbra-infrastructure-part-2-1b61a29a01f6?source=rss-7f1444bd02da------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b61a29a01f6</guid>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[zimbra]]></category>
            <category><![CDATA[mail-server]]></category>
            <category><![CDATA[zextra]]></category>
            <dc:creator><![CDATA[Luca Arcara]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 14:52:49 GMT</pubDate>
            <atom:updated>2020-01-27T14:52:49.087Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sizing Zimbra Infrastructure — Part 2</h3><p>In my previous article, I introduced the HSM architectural pattern. Let’s talk about how Zextras implement it into the Zimbra ecosystem.</p><h3>Zextras HSM implementation for Zimbra</h3><p>Let me make a necessary introduction about Zimbra and its volumes system used to store index and blobs.</p><p>Zimbra supports 3 different types of volumes: Index, Primary, and Secondary.</p><p>Administrators can create multiple instances of each volume type, but only one of each can be the <em>“current”</em> one.</p><p>The <em>current</em> volume is the one in which the server stores the new data, updating the corresponding metadata with the used path.</p><p>When a new mail arrives, the full-text data is stored into the <em>current</em> index volume and the blob is stored into the <em>current</em> primary volume.</p><p>What about the Secondary type?</p><p>The engine designed to move items from all the primary volumes to the current secondary one is Zextras Storage Manager.</p><p>Despite where the secondary volume is, the Storage Manager will <strong>safely</strong> move data from primary volumes, updating the correspondent metadata — according to a specific policy.</p><h3>Real Case Example: new server setup</h3><p>Let me use an example to explain what precisely that means</p><p>Suppose that we are using a physical server with a local disk and without LVM (maybe the worst case)</p><p>In a standard installation, all the data about Zimbra are stored using the mount-point <strong>/opt/zimbra/</strong></p><p>Our setup should be, assuming a scenario of 1000 users sending and receiving 10Gb/day :</p><pre>/dev/sda1 - SSD - 50GB  mount-point / (S.O.)<br>/dev/sdb1 - SSD - 250GB mount-point /opt/zimbra<br>/dev/sdc1 - SAS - 500GB mount-point /mnt/tier1<br>/dev/sdd1 - SAS - 1TB   mount-point /mnt/tier2</pre><p>Our goal is to store metadata an index on SSD device, blobs on tier1 and tier2 devices.</p><p>Usually, the primary store is kept using the standard Zimbra path. In this example, we use a different path to stress more the concept</p><p>After installing Zimbra and Zextras Suite, we have to create the mount-point and assign the right grants.</p><p>Let’s create the necessary mount point by executing, as <em>root</em>:</p><pre>$&gt; mkdir /mnt/tier1/blob &amp;&amp; chown zimbra:zimbra /mnt/tier1/blob<br>$&gt; mkdir /mnt/tier2/blob &amp;&amp; chown zimbra:zimbra /mnt/tier2/blobs</pre><p>Then let’s define the new primary and index stores, executing as <em>zimbra</em>:</p><pre>$&gt; zxsuite powerstore doCreateVolume FileBlob  tier1_volume primary /mnt/tier1/blob</pre><p>and configure the new stores as <em>current</em></p><pre>$&gt; zxsuite powerstore doUpdateVolume FileBlob  tier1_volume current_volume true</pre><p>Zimbra stores new data on the SAS block device, while metadata and index are on the fastest SDD.</p><p>Now to avoid the tier1 device get full, we can define a policy that leaves only blobs received during the last 30days (approx 300GB) and moves out older ones.</p><p>as zimbra user:</p><pre>$&gt; zxsuite powerstore doCreateVolume FileBlob  tier2_volume secondary /mnt/tier2/blobs volume_compressed true<br>$&gt; zxsuite powerstore doUpdateVolume FileBlob  tier2_volume current_volume true<br>$&gt; zxsuite powerstore setHsmPolicy &quot;message,documents:before:-30day&quot;<br>$&gt; zxsuite config server set mail.zextras.loc attribute ZxPowerstore_MoveSchedulingEnabled value true</pre><p>Each night (default start is configured at 2 AM), HSM engine moves all the items according to the policies, form <strong>all</strong> the primary volumes to the <strong>current secondary</strong> ones, without downtime or any impact on connected users.</p><p>Moreover, the files on the secondary store are compressed and deduplicated, optimizing used space and I/O throughput.</p><p>Optionally we can trigger an HSM move using the command:</p><pre>$&gt; zxsuite powerstore doMoveBlobs</pre><p>All the activities could also be done using the web admin interface</p><p>As soon as the server starts to receive messages, the filesystem structure will be:</p><p><strong>Metadata on MariaDB</strong> uses default mount point <em>/opt/zimbra</em></p><pre>$ /opt/zimbra/db/data/<br>                      |- ib_logfile0<br>                      |- ib_logfile1<br>                      |- ibdata1<br>                      |- mboxgroup1<br>                        \--data_source_item.ibd<br>                        \--mail_item.ibd<br>                        \--tagged_item.ibd<br>                      |- mboxgroup...<br>                        \--data_source_item.ibd<br>                        \--mail_item.ibd<br>                        \--tagged_item.ibd</pre><p><strong>Lucene index data</strong> uses /opt/zimbra/index</p><pre>$ /opt/zimbra/index/0/<br>                      |- 1<br>                        \--_1o.fdt<br>                        \--_1o.fdx<br>                        \-- ...<br>                      |- 10<br>                        \-- ...</pre><p>With this configuration:</p><ul><li>Metadata and index have been sized using the “quota rule”, considering the 20% of the overall server’s quota.</li><li>The primary store never gets full.</li><li>Even if the tier2 device get full, it’s quite simple to add a new device and set it as the current secondary store.</li></ul><p>Once we have correctly sized the device dedicated to MariaDB and Lucene, the infrastructure can grow according to user needs, allowing admins to reserve storage <strong>only when effectively needed</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b61a29a01f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sizing Zimbra Infrastructures — Part 1]]></title>
            <link>https://medium.com/@lucaarcara/sizing-zimbra-infrastructures-part-1-95aa81030fbd?source=rss-7f1444bd02da------2</link>
            <guid isPermaLink="false">https://medium.com/p/95aa81030fbd</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[zextra]]></category>
            <category><![CDATA[email-service-provider]]></category>
            <category><![CDATA[zimbra]]></category>
            <dc:creator><![CDATA[Luca Arcara]]></dc:creator>
            <pubDate>Tue, 10 Dec 2019 15:45:21 GMT</pubDate>
            <atom:updated>2020-01-27T14:50:39.986Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTwd8fN7EY-KBcJJ9jBtVg.jpeg" /></figure><h3>Sizing Zimbra Infrastructures — Part 1</h3><p>When speaking to Customers and other SysAdmins, one of the “TopTen most frequent questions” is, “How to correctly size my Zimbra infrastructure?”.</p><p>As you can imagine, the answer is not simple, and sizing could have several aspects depending on what element we are talking about: Storage, Computational, Redundancy, etc..</p><p>Let’s start talking about “Storage Sizing.”</p><h3>The Art of Sizing</h3><p>Sizing an infrastructure can be tough, primarily if the rationals are not defined, or constraints are too strict.</p><p>Some people talk about <em>The art of sizing</em> — and I agree with them — but <em>good news:</em> as an <em>Art</em>, everyone can improve himself and use some practical tips to achieve his goal.</p><p>It’s essential to understand and measure the environment in which our infrastructure will evolve.</p><p>Business Email context is unique. Moreover, emails are required for almost every operation that deals with any type of online service, at least to register, access and recover credentials.</p><blockquote>The number of email users is still growing. 73% of EU individuals aged 16 to 78 use internet to send / receive emails in 2018. Compare this to only 48% in 2007. — Eurostat “Individuals using the internet for sending/receiving e-mails” (2019)</blockquote><blockquote>72% of consumers say that email is their favored conduit of communication with companies they do business with. 61% say they like to receive promotional emails weekly and 28% want them even more frequently. — MarketingSherpa (2015)</blockquote><blockquote>86% of professionals prefer to use email when communicating for business purposes. (HubSpot, 2017)</blockquote><blockquote>— <a href="https://www.emailisnotdead.com/">https://www.emailisnotdead.com/</a></blockquote><p>Let’s consider the esca</p><blockquote><strong><em>Daily number of Emails and Email Users — in billions</em></strong></blockquote><blockquote>2016 → 3.1 Users and 215.3 emails<br>2017 → 3.7 Users and 269.6 emails<br>2018 → 3.8 Users and 281.6 emails<br>2019 → 3.9 Users and 293.6 emails</blockquote><blockquote>— Radicati — Email Statistic Report 2016–2017 -2018–2019</blockquote><p>The number of users and emails is constantly growing. And so space required in our infrastructure.</p><p>Scale-out can be tricky when we have to work with on-premises infrastructures that have limited resources or — worst case — a physical environment with physical storage</p><h3>The (apparently) easiest way</h3><p>Maths can help with the brute-force approach: size the server to provide all the space according to the maximum user quota!</p><p>This approach can be useful if you are a small company but it doesn’t consider many variables and it is not applicable — for example — if you don’t want or cannot apply a quota.</p><p>Moreover, the more extensive the storage is, the higher the costs or the worst the performances.</p><p>Limiting user quota to a few GBs could have been an option some years ago but, nowadays, emails are more frequent, with larger attachments and user requests are so more challenging</p><p>The average size of an email is estimated at around 75KB, 120Kb talking about “business emails”, and the average sending rate is 75 emails/user/day.</p><p>This means that — as business user — you have to consider at least 10/15 MB/day for each user</p><h3>A different point of view</h3><p>The “Quota” approach is not what we need.</p><p>Rather than <em>“How much space do I need?”</em> we should ask <em>“How much space do I need for the next 6/12 months considering my user usage?”</em></p><p>Let’s make an example.</p><blockquote>1000 users — 10GB Quota 1000 user * 10 GB ⇒ <strong>10 TB</strong></blockquote><blockquote>1000 users — 10MB/Day 1000 users * 10MB ⇒ <strong>10GB/day</strong> * 365days ⇒ <strong>3.5 TB/Year</strong></blockquote><p>Assuming my users are involved enough to send and receive 10Mb each one, approximately 15GB <strong>each day</strong>.</p><p>Even if they never delete any messages, reserve 5TB — 50% of the “Quota Approach” — is enough.</p><p>How much is the difference between 5 and 10 TeraByte? Not much if we consider pricing on market consumer.</p><p>But if we consider the $/GB and $/IOPS, for an SSD stack, raid arrays, redundancy and backups, the gap increase.</p><p>The question behind this scenario is another one: after 1 year, what can we do?</p><p>Maybe using Logical Volume should be enough for some installation.<br>It requires a little downtime, but it should be acceptable.</p><p>Another option should be using a storage layer that manages this complexity for us, but it means raising the overall costs.</p><p>We also have to consider that the user’s behavior could change rapidly: number of users, kind of communication, number of messages.</p><p>Let’s take another step further.</p><h3>Hierarchical storage management</h3><blockquote><em>Hierarchical storage management (HSM) is a data storage technique that automatically moves data between high-cost and low-cost storage media. HSM systems exist because high-speed storage devices, such as solid state drive arrays, are more expensive (per byte stored) than slower devices, such as hard disk drives, optical discs and magnetic tape drives. …​HSM is a long-established concept, dating back to the beginnings of commercial data processing. The techniques used though have changed significantly as new technology becomes available, for both storage and for long-distance communication of large data sets. The scale of measures such as ‘size’ and ‘access time’ have changed dramatically. Despite this, many of the underlying concepts keep returning to favour years later, although at much larger or faster scales.</em></blockquote><blockquote>— Wikipedia</blockquote><p>HSM is the architectural approach to answer our initial question.</p><p>It is a concept that aims to separate the different tiers used by core application and data stored, separating data based on a “policy”.<br>Typically, the policy is time-based, but it’s just the usual way, it is not a constraint.</p><p>This approach can be very flexible, and many storage vendors have integrated this concept to design “intelligent” or “smart” cached systems.<br>But these appliances usually are not so cheap.</p><p><em>What if</em> the application itself uses the HSM technique to store the data?<br>What does it mean for a Zimbra Infrastructure?</p><p>Let’s take an example to clarify this point.</p><p>We can split the user emails into 3 groups</p><ul><li>the emails send and received in the last few days</li><li>the emails “flagged” or “tagged” or “unread”, that user will open soon or he opens frequently</li><li>all the other emails</li></ul><p>Zimbra structures data into 3 system:</p><ul><li>MariaDB that stores all the metadata related to a message.</li><li>Lucene, that store all the information needed for the full-text search</li><li>Filesystem, that store the “blob” — the raw data of the object</li></ul><p>Metadata are used to render folders and their content, to execute queries and searches, to manage all the interaction with the users.</p><p>Metadata keeps a few KBs, independently from the message size, and statistically, they use about 10/15% of the entire store size.</p><p>Instead, blobs are used only when the user wants to access the message preview or the attachments.</p><p>For the end-user there is no evidence that blobs are on a separate layer: the users’ latency and bandwidth are several orders of magnitude smaller than the storage ones.</p><p>Moreover, the availability of the secondary store doesn’t impact service availability itself: if the secondary store is unavailable, the user receives a <em>temporary</em> error for the missing blob.</p><p>Thinking about HSM makes us review our initial question. Using HSM, we can</p><ul><li><strong>keep divided mount-point for database, index, and blobs</strong></li><li>use different mount-point according to different policies</li><li>use different storage, with different performance and costs</li><li>compress data on storage, optimizing storage usage, space and I/O throughput</li><li><strong>keep blobs on a device that can be taken offline without impact on provided mail service</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95aa81030fbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>