Disk Space and Bandwidth Management in DirectAdmin – A Complete Technical Guide

DirectAdmin uses a combination of real-time system quotas, log-based bandwidth tracking, and automated tally processes to calculate disk usage and bandwidth consumption. This guide explains how disk usage is calculated, why users may exceed limits, what bandwidth DirectAdmin counts, how reseller bandwidth is handled, how overusage notifications work, and how historical bandwidth logs are stored.

Bandwidth Management in DirectAdminDisk Space

~3 min read • Updated Mar 1, 2026

1. How Disk Space Usage Is Calculated


Starting from DirectAdmin version 1.59.6, the following internal configuration variable is enabled by default:


realtime_quota=2

This enables real-time disk usage reporting using kernel-level quotactl calls, providing the fastest and most accurate results.

Available modes:

  • realtime_quota=0 – Disk usage updated during nightly tally.
  • realtime_quota=1 – Uses the slower quota -v username command.
  • realtime_quota=2 – Fastest and recommended mode using quotactl.

Note: DirectAdmin caches mount device names at startup. If you modify partitions or quota mounts, restart DirectAdmin to refresh the mount list.

Inode usage is also updated in real time when realtime_quota is enabled.

---

2. Why Disk Usage May Exceed the Limit


There are several reasons why a user may appear to exceed their assigned disk quota:

1. Soft vs. Hard Limits

The system hard limit is typically set to 1.1× the DirectAdmin quota to allow temporary overusage for large file operations.

You can reduce this multiplier to 1.0 if strict enforcement is required.

2. Files Not Governed by System Quotas

DirectAdmin counts some files that system quotas do not enforce, such as:

  • MySQL databases
  • Files owned by Apache
  • Mailing list data

These files are not owned by the user and therefore do not fall under system-level quotas, even though DirectAdmin includes them in usage totals.

---

3. What Bandwidth Does DirectAdmin Calculate?


DirectAdmin only counts bandwidth that can be attributed to a specific user. It does not monitor device-level network traffic, so its totals will always be lower than system-wide usage.

DirectAdmin counts:

  • Apache traffic – All HTTP/HTTPS data served for a user’s domain.
  • FTP transfers – Uploads and downloads.
  • Outgoing email – Logged in /etc/virtual/usage/username.bytes.
  • Incoming email – Only for valid accounts.
  • POP/IMAP – When using Dovecot (since DA 1.40.0).
  • DirectAdmin operations – Including backup transfers (can be disabled).

DirectAdmin does NOT count:

  • Script-level transfers (e.g., PHP curl/wget)
  • SSH-level commands (wget, rsync, etc.)
  • System updates (yum, apt, custombuild)
  • DNS traffic (named/bind)
  • Low-level network traffic (pings, ICMP, etc.)
---

4. Reseller Bandwidth (DirectAdmin v1.595+)


DirectAdmin now tracks bandwidth used by deleted users under each reseller. This is stored in:


/usr/local/directadmin/data/users/RESELLER/bandwidth.reseller.tally

A new field appears in reseller.usage:


deleted_user_bandwidth=123456

This value is recalculated nightly and cleared during the monthly reset.

---

5. Notifying Users About Overusage


DirectAdmin sends warnings when users approach or exceed their limits.

Notification templates:

  • /usr/local/directadmin/data/templates/user_limit.txt
  • /usr/local/directadmin/data/templates/reseller_limit.txt

Available tokens:

  • BANDWIDTHUSAGEGIG
  • BANDWIDTHLIMITGIG
  • QUOTAUSAGEGIG
  • QUOTALIMITGIG
  • INODEUSAGE
  • INODELIMIT
  • REASON=quota|bandwidth|inode
  • BANDWIDTH_EXCEEDED=yes
  • QUOTA_EXCEEDED=yes
  • INODES_EXCEEDED=yes

Warning thresholds (percent):


user_warning_thresh=80
user_warning_thresh_disk=95
user_warning_thresh_inode=95
---

6. Pre/Post Scripts for Overusage Notifications


Custom scripts can run before or after sending warnings:

Before sending:


/usr/local/directadmin/scripts/custom/overusage_notice_pre.sh

After sending:


/usr/local/directadmin/scripts/custom/overusage_notice_post.sh

Environment variables include:

  • USERNAME
  • BANDWIDTH
  • QUOTA
  • TIMELEFT
  • SUSPENDATLIMIT
  • CREATOR
---

7. Disabling Overusage Notices for Suspended Accounts


These flags in user.conf track whether warnings were sent:


sentwarning_bandwidth=yes|no
sentwarning_inode=yes|no
sentwarning_quota=yes|no

If an account is manually suspended (account=OFF), DirectAdmin will not send overusage warnings.

---

8. Bandwidth Breakdown for Previous Months


Before the monthly reset, DirectAdmin saves a merged copy of bandwidth.tally.cache into:


/usr/local/directadmin/data/users/username/history/YYYY-MM.log

These logs appear under the User History section, with a “Details” column for viewing past months.

The API also supports historical queries:


CMD_API_BANDWIDTH_BREAKDOWN&year=2024&month=9

Written & researched by Dr. Shahin Siami