>>Until the underlying system memory allocator fails and then it go >boom. How >much goes boom is OS dependent. Some OSes will only allow the errant >process go boom. Others (such as those from Microsoft) the entire OS >go >boom if the out of memory condition encompases the entire V=V address >space. > > >Thanks Keith. So sqlite does look to increase the temp table's cache >size if >it's not big enough? Looking at the results I posted earlier, why did >that >not happen until cache_size was set to -500? Why didn't sqlite just >increased the cache_size from -400 to the required memory? Mind you, >I'm >assuming the test results for cache_size <= -400 were slower because >sqlite >resorted to HD but maybe that's not the case.
Actually I think it is dependant on exactly what you are doing. If you are using a :memory: database, it will continue to grow until all memory is consumed. I think for temp space, however, if you have set "memory only" then I think it will fail allocation when the temp size is used up (but I could be wrong here -- I have never actually run into that issue). However, if you use disk-backed storage (ie, a db file or temp-files, then the memory cache will spill to disk when it is "full" which will generally (hopefully) happen long before you have run out of virtual memory. I've actually ever only run out of system-wide virtual memory a few times in the last several years. Memory is cheap and so I have huge page and temp sizes set by default and lots of memory, and third-level page redirection disabled (ie, no non-RAM backing store). The most troubling thing is that one gets used to have NVMe drives that can I/O in excess of 2 GB/s which creates a real problem moving to machines that do I/O through a pinhole. Those things can usually be fixed though without too much difficulty (usually by using more RAM so as to not do I/O in excess of the pinhole capabilities). _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users