Derek Dong
Research Software Engineer
iRODS Consortium

June 29 - July 2, 2026
iRODS User Group Meeting 2026
Barcelona, Spain
Absorbing Logical Quotas into the iRODS Server
Overview

- What is a logical quota?
- Isn't there already a plugin?
- How does this work?
- Demo!
- Future Plans
What is a logical quota?

It's a quota for logical paths!
Can limit bytes or data objects on logical paths.
e.g. /tempZone/home/alice can have at most 10,000 bytes and 3 data objects.
Isn't there already a plugin?

Yes, there is a rule engine plugin.
This new system aims to fill a different space and has some notable differences!
Most notably: this is a passive system, similar to physical quotas.
Advantages compared to plugin

- Passive system means totals are calculated manually
- Recalculation will not slow down regular operations that need to run through the PEPs
- Bespoke system with its own code paths and SQL
- Plugin relies on other systems (rules/PEPs, metadata) so it necessarily traverses more code paths
- ... so, this should be faster
Test case to show new system speed

- Testing environment:
- Docker container, built from tip-of-main
- 100 nested collections, each with their own quota (20000 bytes)
- Top level collection has a quota of 10000 bytes
- "setup.sh" scripts set up the quotas
$aenvironment variable is just the innermost collection
Plugin times for test case

[irods@868a0ec36633 ~]$ time bash setup.sh
real 3m7.483s
user 0m16.011s
sys 0m4.763s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile1
real 0m39.538s
user 0m0.056s
sys 0m0.017s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile2
real 0m39.780s
user 0m0.062s
sys 0m0.017s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile3
remote addresses: 172.19.0.3 ERROR: putUtil: put error for /tempZone/home/rods/0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/testfile3, status = -169000 status = -169000 SYS_NOT_ALLOWED
Level 0: Logical Quotas Policy Violation: Adding object exceeds maximum data size in bytes limit
real 0m1.570s
user 0m0.060s
sys 0m0.019s
Built-in logical quotas times

[irods@868a0ec36633 ~]$ time bash setup2.sh
real 0m51.561s
user 0m12.896s
sys 0m4.157s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile1
real 0m1.853s
user 0m0.059s
sys 0m0.013s
[irods@868a0ec36633 ~]$ time iadmin calculate_logical_usage
real 0m0.235s
user 0m0.054s
sys 0m0.020s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile2
real 0m1.875s
user 0m0.061s
sys 0m0.012s
[irods@868a0ec36633 ~]$ time iadmin calculate_logical_usage
real 0m0.246s
user 0m0.053s
sys 0m0.021s
[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile3
real 0m1.848s
user 0m0.053s
sys 0m0.019s
[irods@868a0ec36633 ~]$ time iadmin calculate_logical_usage
real 0m0.230s
user 0m0.053s
sys 0m0.018s
Built-in logical quotas times (cont.)

[irods@868a0ec36633 ~]$ time iput testfile1 $a/testfile4
remote addresses: 172.19.0.3 ERROR: putUtil: put error for /tempZone/home/rods/0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/testfile4, status = -186000 status = -186000 LOGICAL_QUOTA_EXCEEDED
real 0m1.022s
user 0m0.057s
sys 0m0.018s
Trade-offs compared to plugin

- Passive system means totals are calculated manually
- Calculated totals can drift from real totals depending on recalculation frequency
How does it all work?

The system has 3 main operations:
- Set (or create) a quota
- API endpoint: (rs/rc)GeneralAdmin
- Get quotas applied to a collection
- API endpoint: (rs/rc)_get_logical_quota
- Recalculate totals
- API endpoint: (rs/rc)GeneralAdmin
Set and recalculate also have MSIs!
How does it all work? (cont.)

How does enforcement work? Where will it enforce?
- First, enable enforcement through R_GRID_CONFIGURATION:
- iadmin set_grid_configuration logical_quotas enabled 1
- Enforcement happens here:
- rsDataObjOpen - catches most oprs like icp, iput
- rsDataObjRename: imv
- rsRegDataObj: ireg
How does it all work? (cont.)

(if previous slide not enough content?)
(add more details about enforcement, including "smart" checks that can bypass enforcement)
Demo!

Hard to understand how it works?
Demo!
Future

- Automatic recalculation after certain operations?
- More active enforcement, or preemptive enforcement?
- Is the plugin still needed?
- Currently, plans are to discontinue release of the plugin
- Please use it! We want to know pain points.
Thank you!

Questions?
UGM 2026 - A new logical quotas system
By fifthpotato
UGM 2026 - A new logical quotas system
- 33