On Wed, Feb 09, 2005 at 09:08:08AM -0800, Anthony Brock wrote: > >>> Paul Warren <[EMAIL PROTECTED]> 02/09/05 07:12AM >>> > > Right, but the memory is mmapped to that file. My understanding is > that > > the memory will only be synced with the disk when either (a) msync > (or > > munmap) gets called or (b) the kernel has nothing better to do. > > > I'm assuming that (a) doesn't happen, and I wouldn't expect (b) to > > happen if the I/O system is otherwise engaged, so I don't understand > > where the performance gain comes from - it should all be in RAM > anyway. > > Paul, > > Assuming that you assessment is correct, what happens when: > > 1. The system is idle (say, for 4 seconds). > 2. The host decides to swap-out the guest kernel and memory. > 3. Your user, in the middle of looking at his programming book, starts > typing again.
A delay. My original question was, does using tempfs do more than prevent the memory from getting swapped out? We have developed a patch that mlock()s the memory (using a setuid helper app), and thus should stop it from getting swapped out. Would using tempfs improve things further? > Also, did you compile your guest kernel with > 'CONFIG_BLK_DEV_UBD_SYNC'? I believe this option forces synchronous > disk activity (to preserve your data). However, someone else might > have a better idea concerning this. We've disabled this. Having searched the archives, I believe the summary is: CONFIG_BLK_DEV_UBD_SYNC == YES => All I/O is synchronous and slow CONFIG_BLK_DEV_UBD_SYNC == NO => I/O is synchronous if you use ubds= on the command line, and the synchronous behaviour is implemented in a faster way than if you use the config option. So, you should never use this config option, even if you want all I/O to be synchronous - you're better off using ubds= On a related note, has anyone tried using LVM logical volumes as root devices for UML guests? My expectation is that this would improve I/O performance as writes do not need to go through two layers of journalling filesystem, but I'd be interested to know if anyone has tried it or if there is any reason why this is a bad idea. Paul ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user