After some advice from Conrad, I now understand the principles of swapping and how network devices operate. I've managed to get the swapping to work by including full logging of the network transfer packets on the netstation. This implies the problem is somehow related to saturating the ethernet, or the buffers on the ethernet cards. Full logging slows the system down excessively; it is not a workable solution. A side issue is that the network block driver (server) cannot seem to open files to device nodes and find out their length with lseek or stat. The driver documentation seems to indicate that you should be able to connect directly to a device. I imagine I could use ioctl to find the drive length, but any information people can shed here would be appreciated. Here is one major source of problems with the server : As long as a transfer involves 1024 bytes of data (within the nbd transfer packet scheme), there is no problem. This happens during transfer to "normally" mounted nbd devices. However, the swap function sends 4096 bytes at a time. You will actually get perhaps ten of these transfers working properly, making a total of up to four read()'s each to transfer the 4096 byte nbd packet. This is transferring the data from the netstation to the server. But then there is a problem on the third data transfer, the last or second last transfer. The read statement waits forever for the packet. I've tried playing a few games, and returning an error packet, but the system still seems to get itself in a knot. Sending back an error packet to the netstation causes it to send another packet; this does not seem a command packet (incorrect magic number), and does not seem to be a data packet - you'd think it was a repeat of the last one. Investigation of the nbd packet handling might solve the problem; I don't know how the netstation is responding to the error packet. Point is, by proper limiting of the traffic, I might be able to get rid of the problem (I'm assuming at this stage it is related to the traffic of a particular 4096 byte transfer, rather than the _total_ traffic). But ... what is the length of the actual ethernet packets, and how do you control the length of the swap transfer ? Perhaps ethernet parameters could be fiddled, perhaps the number of swap pages transferred could be changed. Lastly, a critical delay could be inserted in the transmission; crude, but I'm sure it would work. Is a buffer overrun responsible ? I don't know if it is at the netstation or server end. I'm running a ne2000 pci on the server, and the netstation runs a 3c503 variant. Any ideas here ? Thanks, -- John August -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
