Project

General

Profile

ADMINISTRATION » History » Version 18

Version 17 (Arthur Kreymer, 01/22/2014 12:42 PM) → Version 18/22 (Marc Mengel, 01/27/2015 09:59 AM)

h1. ADMINISTRATION

h2. FILES

Working directories and files are under /grid/data/${GROUP}/LOCK

On the grid, the username does not reflect the identity of the
person who submitted the job.
So the lock script gets the identity from the grid proxy.

/LOCKS - active lock files
The lock files are empty, with names contining
date, time queued, host, pid, user, identity

/QUEUE - locks pending, empty files containing
date, host, pid, user, identity

/LOG - empty files with names reflecting completed locks
date, time queued, time locked, host, pid, user, identity

/LOGS - monthly text summaries built from LOG file names.

/STALE - record of locks that have timed out

glimit - global activity limit, including all user groups
set this near the actual Bluearc capacity
this is not implemented as of 2012-11-06

limit - local activity limit, for the users' own group
set this well under Bluearc capacity

perf - performance MB/sec required in PERF before locking

PERF - actual MB/sec performance, measured by external agent
( No agents implemented as of 2010-08-02 )

rate - net retry rate target, in retries per second

small - MBytes: files smaller than this are not locked by cpn.

wait - mininum time to wait before retrying, regardless of the load.
the time delay before retrying a lock is the minimum of
* wait
* (number of queued locks)/rate



h2. MAINTENANCE

lock files should be owned by some appropriate group account, like mindata.

That account should occasionally remove expired locks and queue entries,
and concatenate LOG entries into monthly summary files.

You can run the lockclean script manually, which will do this hourly :
But be careful, interactive logins on gpsn01 are in group gpcf.
Use 'sg' to set the proper group first
<pre>
GRP=<mygroup>
set nohup ; sg ${GRP} -c /grid/fermiapp/common/tools/lockclean &
</pre>
There should be a crontab entry for each account like
<pre>
@reboot sg ${GRP} -c /grid/fermiapp/common/tools/lockclean
</pre>

| Group | Account@Host | crontab |
| coupp | ifmon@gpsn01 | @reboot sleep 300 ; sg coupp -c /grid/fermiapp/common/tools/lockclean |
| des | desdata@gpsn01 | @reboot sleep 300 ; sg des -c /grid/fermiapp/common/tools/lockclean |
| e875 | mindata@minos27 | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| e898 | ifmon@gpsn01 | @reboot sleep 300 ; sg e898 -c /grid/fermiapp/common/tools/lockclean |
| e938 | minervadat@if02 | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| gm2 | gm2dat@gpsn01 | @reboot sleep 300 ; sg gm2 -c /grid/fermiapp/common/tools/lockclean |
| gpcf | ifmon@gpsn01 | @reboot sleep 300 ; sg gpcf -c /grid/fermiapp/common/tools/lockclean |
| lbne | lbnedata@lbnegpvm01 | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| marslbne | marslbne@lbnegpvm01 | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| marsmu2e | marsmu2e@detsim | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| mu2e | mu2e@mu2egpvm01 | @reboot sleep 300 ; /grid/fermiapp/common/tools/lockclean |
| mu2epro | mu2epro@mu2egpvm01 | RETIRED FEB 4 2013 |
| t-962 | argoneut@argoneutgpvm01 | @reboot sleep 300; /grid/fermiapp/common/tools/lockclean |
| t-1034 | ifmon@gpsn01 | @reboot sleep 300 ; sg t-1034 -c /grid/fermiapp/common/tools/lockclean |
| uboone | uboone@uboonegpvm01 | @reboot sleep 300; /grid/fermiapp/common/tools/lockclean |
| nova | novadata@gpcf028 | @reboot sleep 300; /grid/fermiapp/common/tools/lockclean |
| numix | ifmon@gpsn01 | @reboot sleep 300; sg numix -c /grid/fermiapp/common/tools/lockclean |



h1. USAGE

Get an idea of activity by counting lines in log files.

For example, for Minos,

$ wc -l /grid/data/e875/LOCK/LOGS/*.log
9124 /grid/data/e875/LOCK/LOGS/200908.log
140794 /grid/data/e875/LOCK/LOGS/200909.log
181895 /grid/data/e875/LOCK/LOGS/200910.log
196327 /grid/data/e875/LOCK/LOGS/200911.log
125084 /grid/data/e875/LOCK/LOGS/200912.log
272598 /grid/data/e875/LOCK/LOGS/201001.log
284000 /grid/data/e875/LOCK/LOGS/201002.log
275479 /grid/data/e875/LOCK/LOGS/201003.log
354725 /grid/data/e875/LOCK/LOGS/201004.log
1840026 total


$ wc -l /grid/data/e875/LOCK/STALE/LOCKS/*.log
$ wc -l /grid/data/e875/LOCK/STALE/QUEUE/*.log

h2. INITIALIZATION

New LOCK areas should be created by the ifmon account.
We can use root@if-admin-minos to create this area.

<pre>
ifmon@gpsn01

GROU=<name of the group>
DATA=${GROU} # directory to be locked, usually ${GROU}/data, but not always

Determine what the gid is for the area.
stat /${DATA}/data | grep Gid

root@if-admin-minos

IFUID=45438 # ifmon UID
GRGID=.... # group GID from /${DATA}/data
GROU=<name of the group>

mkdir -p /grid/data/$GROU} # if necessary
ls -ld /grid/data/$GROU} # note original owner
chown ${IFUID}.${GRGID} /grid/data/$GROU} # set ownership while tailoring cpn

REX will verify that the group id name is the same on Fermigrid nodes and in the Lab GID registry, at
http://www-giduid.fnal.gov/cd/FUE/uidgid/gid_id.lis

WARNING - if the group name contains a special character like -,
that group name will not be used on Fermigrid worker nodes.
You need to find out what the group name is there,
and make a symlink in /grid/data for compatibility

GRID=<name of Fermigrid group>

ln -s /grid/data/${GROU} /grid/data/${GRID}

CREATE LOGIN AREA

ifmon@gpsn01

GROU=<name of the group>
sg ${GROU}

. /grid/fermiapp/product/common/etc/setups.sh
ups tailor cpn - will echo the commands proposed
ups tailor cpn -O write - will execute the commands

cd /grid/data/${GROU}/LOCK
chmod 777 DO LOCKS LOG QUEUE

Update gpsn01:ifmon:crontab.gpsn01
adding an entry for the new group
and start the lockclean process manually

crontab crontab.gpsn01

set nohup ; sg ${GROU} -c /grid/fermiapp/common/tools/lockclean &

root@if-admin-minos

reset ownership of /grid/data/$GROU} if desired

Test the locks with a normal user

GROU=<name of the group>

. /grid/fermiapp/products/common/etc/setups.sh

setup cpn

export CPN_LOCK_GROUP=${GROU}

lock
LOCK - Wed Jan 22 16:37:07 UTC 2014 lock /grid/data/t-1034/LOCK/LOCKS/20140122.16:37:07.0.minos27.7436.kreymer.kreymer

lock free
LOCK - Wed Jan 22 16:37:09 UTC 2014 freed /grid/data/t-1034/LOCK/LOCKS/20140122.16:37:07.0.minos27.7436.kreymer.kreymer

cpn /usr/bin/crash /dev/null
LOCK - Wed Jan 22 16:37:44 UTC 2014 lock /grid/data/t-1034/LOCK/LOCKS/20140122.16:37:44.1.minos27.30874.kreymer.kreymer
LOCK - Wed Jan 22 16:37:44 UTC 2014 freed /grid/data/t-1034/LOCK/LOCKS/20140122.16:37:44.1.minos27.30874.kreymer.kreymer

</pre>