From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Thu, 11 Aug 2011 13:04:05 PDT." References: <20110810220404.D6021B827@mail.bitblocks.com> <20110811195427.CAF8FB827@mail.bitblocks.com> Date: Thu, 11 Aug 2011 13:20:27 -0700 From: Bakul Shah Message-Id: <20110811202027.AE4A4B827@mail.bitblocks.com> Subject: Re: [9fans] simple venti demo: Topicbox-Message-UUID: 0ff27d64-ead7-11e9-9d60-3106f5b1d025 On Thu, 11 Aug 2011 13:04:05 PDT ron minnich wrote: > On Thu, Aug 11, 2011 at 12:54 PM, Bakul Shah wrote: > > > Pay attention to vtsync? May be not for your mythical multiTB > > ramflash but in real life syncing on every write is expensive. > > are you sure? On a multicore server, why not have a syncing task and a > serving task? Since all of the arena is in ram, the synciing task will > not interfere with the serving task, esp. if sata controller and > network are on different PCI busses. Not sure we are on the same page.... Possible I missed what you are really asking! I thought you were comparing your implementation with lucho's. >>From a quick scan of your mmap based code it seems you do an msync on every write which I think is excessive. I don't know under what conditions vtsync is sent but presumably the client sends it at least at the end of an update. But that doesn't stop the server from doing opportunistic syncs in a separate thread to reduce the amount of work that remains to be done when it receives an actual vtsync from the client. But when it does receive one it has ensure that all the data is synced before responding back. > I don't think the tradeoffs are obvious at all. I thought that was obvious!