Re: ENBD and swap
[email protected] (Peter T. Breuer)
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
Dag Sverre Seljebotn <[email protected]> wrote: > > All that enbd does is lock the client code in RAM when you run with > > "-s". Then the client cannot be swapped out. After that it's up to > > you and the kernel! > > > > Now, if you are using a tcp transport, then tcp will use buffers to deal > > with out of order packets, fragmentation, and so on. If RAM is full, > > then the kernel must swap something out to get memory for the buffers. > > Unfortunately, if swap is over tcp, you are stuck. > > Would it be possible to preallocate all the memory TCP would ever need > and lock it in memory? No. Not with current kernel architecture (AFAIK). But as I said, so long as you run the connection it is likely that you will ALWAYS have a 1.5KB buffer already allocated, and if you keep the transaction blocksize to 1KB and never send one request before another is finished, and never fragment packets, and never have to reassemble or retry after collisions, you won't ever force the kernel to need more buffer space. So why not just do that? You probably can get way with just the 1KB blocksize and the dedicated full duplex cable. Peter