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 a logical path.

 

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 notable change: 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

 

  • New code is a bespoke system with its own code paths
    • The plugin relies on other systems (rules/PEPs, metadata) so it necessarily traverses more code paths
    • Therefore, the new system should be faster!

Timing Tests

  • Testing environment:
    • Docker container, built from tip-of-main (pre-5.1.0)
    • 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
    • $a environment variable is just the innermost collection

Timing Tests: Logical Quotas Plugin

$ time bash setup_logical_quotas_plugin.sh

real    3m7.483s
user    0m16.011s
sys     0m4.763s

 

$ time iput testfile1 $a/testfile1

real    0m39.538s
user    0m0.056s
sys     0m0.017s

 

$ time iput testfile1 $a/testfile2

real    0m39.780s
user    0m0.062s
sys     0m0.017s

 

$ 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

 

Timing Tests: Built-in Logical Quotas

commandduration
bash setup_builtin_logical_quotas.sh51.561s
iput testfile1 $a/testfile11.853s
iadmin calculate_logical_usage0.235s
iput testfile1 $a/testfile21.875s
iadmin calculate_logical_usage0.246s
iput testfile1 $a/testfile31.848s
iadmin calculate_logical_usage0.230s


About 20x faster...

 

$ 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

Timing Tests: Built-in Logical Quotas

 

More testing shows roughly linear performance for recalculating totals.

 

Time to recalculate 1 million data objects: ~2s

 

Time to recalculate 11.3 million data objects: ~27s

Other Timing Tests: Built-in Logical Quotas

Built-in system vs. plugin

  • Passive system means totals are (re)calculated manually
     
  • Therefore, calculated totals can drift from real totals
    • Depends on recalculation frequency

How does it all work?

The built-in system has 3 main operations:

  • Modify/create (set) 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 microservices available to admin rules.

Enforcement

  • Enable enforcement through R_GRID_CONFIGURATION:
    $ iadmin set_grid_configuration logical_quotas enabled 1

 

  • Enforcement happens here:
    • rsDataObjOpen: catches most operations like icp, iput
    • rsDataObjRename: imv
    • rsRegDataObj: ireg

Demo!

Future

  • Automatic recalculation after certain operations?
  • More active or preemptive enforcement?
  • Is the plugin still needed?
    • Current plan is to discontinue development

 

Please use the new system. We want to know pain points.

Thank you!

Questions?