In article <1992May6.163624.19734@eplrx7.es.duPont.com> I write:
>I have a 4/370 with 32MB of memory. I need to transfer about 15MB of
>pixel data from memory to a film recorder via a DR11 (1.2mbs). The
>DR11 needs to be fed data continuously. If there is a delay the film
>recorder leaves blotches on the film. Although it is a single user
>system there appears to be a lot of swapping occuring which is probably
>causing the delay.
>
>I am currently looking at using madvise(3) or mlock(3) to help reduce
>any transfer delays due to swapping. Does anyone have other
>suggestions? Is so please Email me. Thanks in advance.
A number of people asked me to summarize the answers I received to this
query. Here they are:
---SunOS is not a real time OS. The only way to guarantee it will work is to do it in the kernel (i.e. write a driver).
Thanks to dd@mips.com.
---
You didn't mention mmap(2) in your mem stuff above, but I assume you were including it. You might also consider setting up a double buffering scheme. From what I remember about the DR-11 (on a PDP-11) was that it was a very simple device that had a maximum transer of 32k (bytes or words?). If that is true on the the one you are using, memory mapping won't buy you as much as double-buffering. You can do from the user level by setting up co-operating processes that switch roles of writing/reading via signals. There are probably some public domain programs out there that do this type of things to write tapes.
Thanks to pag@hao.ucar.edu.
---
I have used the Ikon 10089 DRV11-W board on a Sun 4/370, running SunOS 4.0.3, also running X11R4 and 8MB of RAM. We did input from a recorder at a speed of 800KBytes pr second, at the same time we wrote the the data to one of two SMD 1.2GB disks, we used the disks as raw device, thus we used a buffer size of 64KB and DMA from DR11 and 128KB to the disks. We used the Sun Cunsultants device driver for DR11. The input process was running with a priority of -20, thus it is only the swapper and pager, and update, which has a higher priority.
The input process was waiting for the SIGUSR1 interrupt before reading the DMA. An other solution would have been to always go into a read() on the DR11 device, and set the timeout in the device driver to about 10s, thus after 10 seconds in the read opereration you would timeout if you didn't get anything. You could may do this on output to.
It's worth noting that SunOS 4.0.3 does not have Shared Objects/Libs, thus despite the fact that we had only 8MB of RAM, we had no problems with swapping. I claimed 5 buffers of 128MB of shared memory for this process.
Have you used vmstat, or other utilities? Do you mean 1.2 Mega Bytes pr. Second or is it mega bit pr. second? I know that Ikon have done 6MB byte pr. second on an IPX using theire SBUS DR11 board.
Thanks to aadne@tss.no.
---
Your best, most reliable, solution is to buy another 32 MB of memory.
Thanks to miker@sbcoc.com.
---
Update may be interrupting also... every 30 sec for a few seconds.
I have had to kill it when doing time-critical things, or kill it and sync the disks myself occasionally.
Thanks to anand@lynx.ociw.edu.
---
If you run set-uid-to-root, you can do more, such as:
- use plock(3). That should eliminate swapping.
- use setpriority(2) to up the process priority.
- use asynchronous I/O. This is the biggest potential win, the driver has to allow setting up the pending DMA and switching to it at interrupt time. That would shorten latency to ~30 microsec.
Thanks to wyatt@cfa214.harvard.edu. -- cristy@dupont.com
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:42 CDT