On Jul 4, 2011 11:11 AM, "Jens Alfke" <[email protected]> wrote: > > > On Jul 3, 2011, at 11:41 PM, Matthew John wrote: > > > how does CouchDB perform > > when compared to MySql in performing the Warm-up (lets define Warm-up as > > filling the memory with Disk data in a judicial manner). > > No idea. But really, you could perform something very similar by doing something like > cat /path/to/my_database.couch > /dev/null > since that would have the same effect of loading the file contents into the VM cache. So it’s not really that specific to CouchDB itself. > > How large is your data-set? How many rows, and what’s the disk space occupied by the MySQL tables? > > —Jens
It should also be noted that CouchDB does not do any caching of its own. I don't know if MySQL does, but if yes then your warm-up query is possibly letting MySQL cache some index headers or something, but nothing exactly like this happens in CouchDB. The only caching is at the filesystem/OS level. In fact, if your OS hasn't decided to dump the page cache, it may be beneficial _not_ to do anything that might disturb it between restarts, since some of that file data might still be around. This behavior would depend on your OS keeping the pages around after all file descriptors are closed. I don't know whether that happens or when. Maybe there is a kernel setting for this behavior?
