Print

Print


This adds two new concurrency limits in the throttle plugin:
1.  Maximum number of open files per unique entity (which might be a unique identifier from a token).
2. Maximum number of "active connections" per entity.

The intent is to provide some per-"user" limits on resource consumption.  (1) should be self-evident; open file handles are expensive for some filesystems and this prevents exhaustion by a single user.

(2) is less obvious.  I define an "active connection" to be a thread with at least one open file handle.  It's meant to approximate "open connections" as each connection currently costs an OS thread and these are definitely finite resources.  I see the throttle plugin as a reasonable place to do this because (a) it's self-contained (no changes outside the plugin) and (b) for connections not associated with a particular entity (e.g., tokens), an open file might be the only reasonable place where the "owner" is defined.  This will *not* be useful for limiting idle connections (but the reaper can help with these) or connections where files aren't being opened (e.g., a client only doing stat's).  This *would* cover the instances that @juztas has described where a user with many concurrent jobs overloads his server; I just wanted to point out it's not a general-purpose solution (and, after a few tries, I've concluded that a solution without any tradeoffs is not obviously in reach...).

This introduces two new configuration parameters and two new debug levels.  Here's what I was using in testing:

```
xrootd.fslib ++ throttle
throttle.max_open_files 3
throttle.max_active_connections 2
throttle.trace debug files connections
```
You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/1582

-- Commit Summary --

  * Add max file open tracking.
  * Add support for connection tracking in the throttle plugin.

-- File Changes --

    M src/XrdThrottle/XrdThrottle.hh (8)
    M src/XrdThrottle/XrdThrottleFile.cc (35)
    M src/XrdThrottle/XrdThrottleFileSystemConfig.cc (56)
    M src/XrdThrottle/XrdThrottleManager.cc (188)
    M src/XrdThrottle/XrdThrottleManager.hh (18)
    M src/XrdThrottle/XrdThrottleTrace.hh (2)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/1582.patch
https://github.com/xrootd/xrootd/pull/1582.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1582
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1