From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,42fb1e6e6513230c,start X-Google-Attributes: gidfa528,public From: Tony Verhulst Subject: Asynchronous I/O changes for V5.1 Date: 2000/11/17 Message-ID: <3A15593D.BBC55E0B@zk3.dec.com>#1/1 X-Deja-AN: 694784719 X-Accept-Language: nl, en Content-Type: multipart/mixed; boundary="------------B254BC42F076AAC5BDC3AC1B" X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 974477608 10385 16.140.128.246 (17 Nov 2000 16:13:28 GMT) Organization: UNIX Kernel Group Mime-Version: 1.0 NNTP-Posting-Date: 17 Nov 2000 16:13:28 GMT Newsgroups: comp.unix.tru64 This is a multi-part message in MIME format. --------------B254BC42F076AAC5BDC3AC1B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit --------------B254BC42F076AAC5BDC3AC1B Content-Type: text/html; charset=us-ascii; name="aio_tune.html" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="aio_tune.html"
Asynchronous I/O Tuning Changes in V5.1
Tony Verhulst 16 Nov 00
Before V5.1

Before V5.1, AIO data structures were global to the system.  That is, There was one "AIO Completion" array that all tasks competed for (we'll ignore the per CPU compartmentization option for now).  The size of this global array was controlled by the aio_max_num parameter in the rt subsystem (see sysconfig -q rt). It was quite possible for one task to use the entire global array, thereby starving other tasks from using AIO.  For this reason the aio_task_max_num rt configuration parameter was created.  When properly set, this parameter would prevent a single task from using too much of the global resource, and leave enough for other tasks.

NUMA Changes everything.

The above worked fine with our existing SMP (Symetric Multi Processor) architectures but in NUMA (Non Uniform Memory Access) architectures, a single global resource like the AIO completion array is not a good idea for several reasons.   If the  global data structure resided on one NUMA node,  tasks running on processors on that node would have rapid access to the data structure because local memory access is fast.  On the other hand,  tasks executing on processors on other nodes would suffer in performance because remote memory access is much slower.  One way around this problem would be to replicate the data structure so that each NUMA node would have its own structure.  That way all array accesses would be local and, therefore, fast.  The catch (and you knew that there would be a catch, right?) is when you try to load balance the system.  Moving a task from one node to another would be a bad idea because what would you do with pending AIO operations in progress?

The V5.1 Solution

We decided that the best SMP AND NUMA solution would be to completely eliminate the global AIO completion data structure.  When this data structure disappeared, the aio_max_num configuration parameter in the rt subsystem was eliminated because it became meaningless.  What we did was to create an AIO completion array for each task.  This solved our 2 NUMA problems - all array memory accesses became local and, if the operating system decided to move the task to another NUMA node (for load balancing purposes) it would be trivial to move the AIO completion array with it because no one else would be accessing it.

For V5.1, an AIO completion array is allocated for a task when the task attempts to perform an AIO operation.  The size of this array is controlled by the existing aio_task_max_num rt configuration parameter.  If a task never uses AIO, no data structure is ever allocated. When a task using AIO terminates, the memory for the per task AIO data structures is released back to the system.

--------------B254BC42F076AAC5BDC3AC1B--