home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / cray / 267 < prev    next >
Encoding:
Text File  |  1992-09-08  |  16.5 KB  |  367 lines

  1. Newsgroups: comp.unix.cray
  2. Path: sparky!uunet!stanford.edu!ames!data.nas.nasa.gov!wk42!ciotti
  3. From: ciotti@wk42.nas.nasa.gov (Robert B. Ciotti)
  4. Subject: D.C. CUG and SRFS
  5. Keywords: Long
  6. Sender: news@nas.nasa.gov (News Administrator)
  7. Organization: NAS, NASA Ames Research Center, Moffett Field, CA
  8. Date: Wed, 9 Sep 92 01:30:17 GMT
  9. Message-ID: <1992Sep9.013017.27969@nas.nasa.gov>
  10. Lines: 355
  11.  
  12.  
  13. Topic: Session Reservable File Systems (SRFS)
  14.  
  15. At the up comming CRAY User Group meeting, the topic of Session Reservable 
  16. File Systems (SRFS) will be raised at the Operating Systems Special Interest
  17. Committee (OS-SIC) meeting Monday morning, September 14. SRFS is a facility
  18. developed at NASA that provides a resource management function for the mass
  19. storage requirements of running jobs. 
  20.  
  21. The issue to address will be whether SRFS functionality is desired at 
  22. other CRAY sites. The committee will be preparing a recommendation
  23. to CRI and requests your input. If other sites *express* interest, 
  24. SRFS may be included in a future release of UNICOS. Included in this 
  25. message are some abstracts that detail SRFS. 
  26.  
  27. Our experience with SRFS has shown it to be a very useful facility 
  28. in our disk management and administration. 
  29.  
  30. A more detailed paper is available by making a request to me by e-mail
  31. or USPS. If you will not be attending the CUG meeting, please feel
  32. free to proxy your voting interest to me. 
  33.  
  34. Bob Ciotti
  35.  
  36. ----------------------------------------------------------------
  37. Robert B. Ciotti                         HSP Systems Development
  38. Numerical Aerodynamic Simulation N258-5  TEL (415) 604-4408
  39. NASA Ames Research Center                FAX (415) 604-4377
  40. Moffett Field, CA 94035-1000             ciotti@nas.nasa.gov
  41. ----------------------------------------------------------------
  42.  
  43.  
  44. -------------------------------------------------------------------------------
  45. -------------------------------------------------------------------------------
  46. -------------------------------------------------------------------------------
  47.  
  48. Session Reservable File Systems (SRFS)
  49. Bob Ciotti
  50. NASA Ames Research Center
  51. Moffett Field, CA 94035, USA
  52. ciotti@nas.nasa.gov
  53. April 4, 1992
  54.  
  55. Abstract
  56.  
  57. Neither UNIX nor UNICOS provide an integrated resource management 
  58. facility to control and support the allocation of file space. Session Reserv-
  59. able File Systems enable resource control of file space allocation on a per 
  60. session, per file system basis. This facility guarantees access to reserved 
  61. space. Integrated resource management is provided through NQS so that 
  62. jobs are scheduled as file space resources are available. Resource sharing 
  63. between interactive users and NQS is dynamic and can be configured to 
  64. provide equal access to critical resources (e.g. SSD). All UNIX file system 
  65. semantics are preserved and are completely backward compatible. Load 
  66. sensitive performance variations are eliminated by limiting file space allo-
  67. cation on ldcached file systems. Configuring the SSD as a ramdisk has the 
  68. added benefit of doubling I/O throughput performance over ldcache.
  69.  
  70. 1.0    Introduction 
  71.  
  72. Session Reservable File Systems (SRFS) was developed at the Numeri-
  73. cal Aerodynamic Simulation Facility (NAS) at NASA Ames Research 
  74. Center, Moffett Field, CA. SRFS is currently in production on both of 
  75. the supercomputers at NAS: Navier (a CRAY2 4-4/256), and Reynolds 
  76. (a Y-MP 8-8/256 with 256MW Solid State Devide (SSD)). Computa-
  77. tional Fluid Dynamics is the primary research science pursued at NAS. 
  78. Computational chemistry is not as common, but is particularly prone to 
  79. using large amounts of temporary file space. Frequently, the standard 
  80. workload of jobs produces a clashing demand for file space resources. 
  81. The principal motivation behind the development effort was to provide 
  82. a means of resource management for file space allocation between 
  83. competing scientific applications, whether interactive or batch (Net-
  84. work Queuing System - NQS).
  85.  
  86. 2.0    Motivation
  87.  
  88. UNIX views resources as infinite. As long as one may assume that this 
  89. is the case, resource allocation among competing processes is not an 
  90. issue. Once we hold that certain resources are scarce (e.g., competing 
  91. processes frequently cause overallocation), or subject to performance 
  92. degradation when over allocated (e.g., ldcache, main memory), a for-
  93. malized allocation management function is in order. File space is such a 
  94. resource. Jobs having a requirement for significant amounts of file 
  95. space should be capable of specifying this as a requirement for execu-
  96. tion. Lacking this capability leads to loss of CPU time, and in the case 
  97. of ldcache, leads to varied and poor performance. This is the primary 
  98. motivation for the development of SRFS.
  99.  
  100. 3.0    Requirements
  101.  
  102. An integrated resource management function for file space is needed. 
  103. Below is a summarized list of requirements that outlines the functional-
  104. ity provided through SRFS: 
  105.  
  106. o    Ability to reserve file space per file system
  107. o    Guaranteed access to reserved file space
  108. o    Portability TO/FROM target machine
  109. o    Support of all UNIX and FORTRAN I/O
  110. o    Prevent or allow overuse of reserved space
  111. o    Signal disallowed attempts to overuse reserved space
  112. o    Provide system and session level monitoring
  113. o    Integration into NQS
  114. o    Batch and interactive co-existence
  115. o    No significant degradation in performance.
  116. o    Administrative control of over/under subscription
  117. o    Logging of accounting information
  118. o    Effecting Quotas
  119.  
  120. 4.0    Design
  121.  
  122. 4.1    General Outline
  123.  
  124. A Session Reservable File System is an attribute that any native file 
  125. system may posses. The system initialization (/etc/rc) files typically 
  126. contain the necessary commands to set up the file systems as desired 
  127. (see sadmin(1) below) after being fsck'ed and mounted. Once the sys-
  128. tem has been initialized, any session has access to the reservation 
  129. mechanism (see srfs(1) and qsub(1) below). Sessions are either initi-
  130. ated by NQS when starting a job from an NQS queue, or by init when 
  131. spawning an interactive log-in. The session terminates when either the 
  132. NQS job finishes, or when the interactive user log-off. Any session, 
  133. either interactive or NQS, may preallocate file space on a Session 
  134. Reservable configured file system. Unused reserved space is returned to 
  135. the system either when the session voluntarily releases it or when the 
  136. session terminates. 
  137.  
  138. 4.1.1    User Interface
  139.  
  140. When a session wishes to make a reservation, it makes a system call. 
  141. The session passes the amount required and a pathname to a file or 
  142. directory on the file system where the reservation is desired. The UID, 
  143. GID, and ACID of the file/directory passed in the system call are used 
  144. by the kernel in processing the request. If the process making the call is 
  145. either UID root or SUID root the request is processed as long as there is 
  146. sufficient unreserved space to allocate the amount of requested space. If 
  147. the calling process is not root, the kernel then validates the request 
  148. against several criteria:
  149.  
  150. The space allocated remains in the possession of the session until it is 
  151. specifically released, or the session terminates. 
  152.  
  153. To illustrate, take for example User Smith. User Smith logs on and 
  154. requests 100 megabytes on /scr/smith. User Smith then runs a CFD 
  155. application and creates 95 megabytes of output in a file called OUT1. 
  156. Smith still has 5 megabytes of guaranteed space reserved. Now Smith 
  157. decides that OUT1 is incorrect and deletes it. Since Smith created and 
  158. then deleted the OUT1 file, the amount of guaranteed space is back to 
  159. the original 100 megabytes. User Smith then reruns the corrected ver-
  160. sion creating 90 megabytes of output. User Smith then logs out, and in 
  161. doing so automatically returns the 10 megabytes of unused reserved 
  162. space to the system.
  163.  
  164. Any number of files may be created and deleted. Tracking is performed 
  165. on the net balance of allocated disk blocks that are created/deleted in 
  166. the UID, GID and ACID specified in the reservation request. 
  167.  
  168. 4.1.2    Administrative Controls
  169.  
  170. When the administrator wants to designate a file system as Session 
  171. Reservable, a system call is made to do so. Flexibility in how SRFS 
  172. may be configured on different file systems is important in order to sup-
  173. port varied working environments and applications. There are three 
  174. pieces of information passed to the kernel for initializing the attributes:
  175.  
  176. 1.    The pathname to the mount point of the file system that is to be ses-
  177. sion reservable.
  178.  
  179. 2.    A value which indicates the number of blocks to over/under sub-
  180. scribe the named file system.
  181.  
  182. 3.    One of the following four behavioral variants:
  183.  
  184.        o    Soft Mount 
  185.        o    Hard Mount 
  186.        o    Soft/Restricted Mount 
  187.        o    Hard/Restricted Mount
  188.  
  189. SRFS may be turned on or off at anytime. If turned off when one or 
  190. more sessions have an existing reservation, all reservations are erased, 
  191. but the processes within the sessions are otherwise unaffected. The file 
  192. allocation mechanism then returns to a first-come first-served policy.
  193.  
  194. 4.1.3    Checkpoint/Restart
  195.  
  196. Sessions (jobs) that are checkpointed and killed release all of their 
  197. unused reserved space. Any files created by the session on the reserved 
  198. file system still remain. When the job is restarted, all SRFS allocations 
  199. are reinitiated. If current space limitations will not allow the reinstate-
  200. ment, the restart will fail. Failed restarts may be tried again later when 
  201. the required file space resources are available.
  202.  
  203. 4.1.4    NQS Extensions
  204.  
  205. NQS has been modified to provide for the notion of resource allocation 
  206. of file space and special scheduling consideration for the jobs that 
  207. request it. The modifications to NQS were made so as to maintain com-
  208. patibility between modified and unmodified versions of NQS. The ver-
  209. sion of NQS modified to support SRFS is completely backward 
  210. compatible with other existing version of NQS. Requests are processed 
  211. by the NQS daemon which in effect makes reservations on behalf of the 
  212. requesting session (NQS job).
  213.  
  214. 4.1.5    Scheduling
  215.  
  216. Because the availability of file space is continually changing, and jobs 
  217. have varied file space requirements, NQS schedules jobs based upon 
  218. the availability of file space and the demand for that space. 
  219.  
  220. The first fit SRFS scheduling mechanism has been incorporated into the 
  221. standard FIFO scheduling mechanism. The existing site-dependent 
  222. queue structure does not require modification or additional queues to be 
  223. defined. An NQS job will not be started until all of its SRFS require-
  224. ment(s) can be satisfied. If a job's SRFS requirement(s) can be satis-
  225. fied, the NQS daemon obtains the file space and passes it to the job 
  226. when first started. If the requested space is not available on the speci-
  227. fied file system(s), the job is held until the space becomes available. In 
  228. the meantime the request is bypassed and the next jobs up the queue is 
  229. tested for execution. If the next job does not have a reservation request, 
  230. or the reservation request(s) can be satisfied, then that job is run next. 
  231. This is repeated until a runable job is found.
  232.  
  233. There are two situations where SRFS requirements could prevent a job 
  234. from starting:
  235.  
  236. 1.    The UID, GID, or ACID quota is preventing the request from suc-
  237. ceeding. If this is the case, the user that submitted the job is 
  238. informed one time via mail. It is then the user's responsibility to cre-
  239. ate enough free quota space for the job to run. The job then remains 
  240. in the queue until it is explicitly removed or enough quota space has 
  241. been freed to allow the job to run.
  242.  
  243. 2.    The file system does not have enough free space to support the 
  244. request. If this is the case, the NQS daemon takes note of the time 
  245. that this event occurred. After a per-queue configurable amount of 
  246. time (see queue time-out - /etc/srfsqto.conf below) a job will become 
  247. assisted.
  248.  
  249. 4.1.6    Job Assist
  250.  
  251. Due to high demand and/or very large requests jobs may be eligible for 
  252. execution but unable to run because their SRFS requirements cannot be 
  253. met. Under certain conditions (see #2 above) the NQS daemon will 
  254. track the amount of time that jobs wait for SRFS requests. Each queue 
  255. is configured with a threshold value in minutes waiting. Once this 
  256. threshold value is exceeded, the NQS daemon enters a state that for the 
  257. job called assist. When a job becomes assisted, no other requests for 
  258. file space on the file system that caused the assist will be processed 
  259. through NQS. Attrition or data migration is then relied upon to free 
  260. enough space for the request. 
  261.  
  262. 4.1.7    Temporary Directories
  263.  
  264. Temporary working space for jobs is managed effectively through the 
  265. use of the tmpdir(1) facility provided in UNICOS. However a problem 
  266. exists in that users do not know the name of their tmpdir directories at 
  267. the time of the qsub(1) request. Therefore a configuration file of key-
  268. word names (see /etc/tmpdir.conf below) allows users to specify a key-
  269. word that is later mapped to a directory name. The NQS daemon will 
  270. create a temporary directory for the user and make the directory path 
  271. available in the users environment variable space under the $keyword 
  272. name.
  273.  
  274. For example: 
  275.  
  276. qsub -lr `$BIGDIR',50MW
  277.  
  278. On our system, this allocates 50 megawords to the user on the tmp-
  279. dir(1) managed file system /big. Users access the name of their tempo-
  280. rary directory on /big via the environment variable $BIGDIR, which 
  281. evaluates to something like /big/nqs/a0001. Interactive users are also 
  282. automatically assigned a $BIGDIR via the system shell initialization 
  283. files (e.g., /etc/cshrc or /etc/profile). This provides script compatibility 
  284. between interactive and batch environments.
  285.  
  286. 5.0    Implementation
  287.  
  288. 5.1    System Call Interface
  289.  
  290. It was strongly desired to make the kernel and NQS changes as modu-
  291. lar as possible. Further, effecting as few source files as possible was 
  292. also desirable to reduce the effort required to maintain our source with 
  293. constant updates and fixes coming in from CRI.
  294.  
  295. The quotactl(2) system call was chosen for modification because of its 
  296. similarity in function, and the desire not to create an additional system 
  297. call. All interfaces for the support of user commands and administrative 
  298. control are provided via the modified quotactl(2) system call. These are 
  299. detailed in the man page appendix. 
  300.  
  301. 5.2    User Interface
  302.  
  303. Due to the nature of UNIX and NQS, it was unavoidable to have two 
  304. different user-level interfaces to SRFS.
  305.  
  306. Interactively, users make requests for allocation of space via the srfs(1) 
  307. command (see man page appendix). When a user makes a request inter-
  308. actively, the request returns immediately. If successful, the space is 
  309. reserved and a positive status is returned. If the attempt fails, negative 
  310. status is returned and quotactl(2) will have set errno to the appropriate 
  311. value that can be listed from the srfs(1) command using the -v com-
  312. mand line option. The return status allows the command to function 
  313. within a shell script using an if test conditional branch. 
  314.  
  315. To make SRFS requests via NQS for batch processing, qsub(1) was 
  316. modified to accept an additional command line argument -lr or an 
  317. embedded shell script command #QSUB (see man page appendix). 
  318.  
  319. Interactive and batch jobs adjust or release their SRFS requests via the 
  320. srfs(1) command. All informational displays are also handled by 
  321. srfs(1). 
  322.  
  323. Root has the capability of adjusting the SRFS allocations of any job on 
  324. the system via the srfs(1) command. 
  325.  
  326. 5.3    Administration
  327.  
  328. 5.3.1    Initialization
  329.  
  330. File system initialization of SRFS is handled through the sadmin(1) 
  331. command (see man page appendix). The sadmin(1) command will typ-
  332. ically appear in the systems /etc/rc start-up files after the file systems 
  333. have been fsck'ed and mounted. Once this has been done, the SRFS 
  334. attributes applied remain until the system is brought down or otherwise 
  335. specifically removed.
  336.  
  337. 5.3.2    NQS Administration
  338.  
  339. Several configuration and information files are used and maintained by 
  340. NQS for SRFS processing. 
  341.  
  342. 1.    /etc/srfsqto.conf  - Queue time out configuration
  343. 2.    /etc/tmpdir.conf   - Temporary directory configuration
  344. 3.    /usr/spool/nqs/log - General SRFS information
  345. 4.    /usr/spool/srfslog - Detailed SRFS information
  346.  
  347. 8.0    Future Directions
  348.  
  349. Now that qsub(1) has the capability for users to specify their file space 
  350. usage requirements, the system can use this information for more than 
  351. just scheduling. There is interest in somehow tying these estimates into 
  352. an automatic mechanism for data migration. 
  353.  
  354. 9.0    Summary
  355.  
  356. At NAS, SRFS has provided an integrated resource management tool 
  357. for access to file space on the Cray supercomputers. SRFS allows us 
  358. more flexibility to provide our users with better functionality and per-
  359. formance. SRFS retains full backward compatibility for all I/O and 
  360. NQS. 
  361.  
  362. Ldcache alone is quite subject to severe load sensitive performance 
  363. variations with even conservative cache to disk ratios. Ramdisk pro-
  364. vides consistent performance and outperforms production throughput 
  365. rates by at least a factor of two compared to ldcache. 
  366.  
  367.