Re: [sqlite] SQLITE_MAX_MMAP_SIZE 2GB default

2019-04-23 Thread Carl Edquist
Thanks Jens! On Mon, 22 Apr 2019, Jens Alfke wrote: But yeah, I agree with you that it seems odd to have a compiled-in restriction on the maximum memory-map size. I looked a bit into the history, and it appears the just-under-2GB limit was specifically put there (by drh) so that the value wo

Re: [sqlite] SQLITE_MAX_MMAP_SIZE 2GB default

2019-04-22 Thread Jens Alfke
> On Apr 19, 2019, at 12:46 PM, Carl Edquist wrote: > > For instance - if you have a 30GB db file on a 64bit system with <= 2GB ram, > you can still mmap the whole file, and benefit from that mmap. If the > portion of the db that gets used for a query fits within the available > pagecache r

Re: [sqlite] SQLITE_MAX_MMAP_SIZE 2GB default

2019-04-19 Thread Carl Edquist
Hi Jens, thanks for your reply. 2GB still still seems reasonable as a default, since SQLite is not primarily targeted at servers with oodles of RAM. (Remember, "64-bit" includes nearly all current mobile phones/tablets, which still have small amounts of RAM, 2GB or less.) My comment about 32

Re: [sqlite] SQLITE_MAX_MMAP_SIZE 2GB default

2019-04-19 Thread Jens Alfke
> On Apr 18, 2019, at 7:33 PM, Carl Edquist wrote: > > Just wondering if there is a reason not to increase the max for 64bit builds > (to some large value like 1TB) ? Especially given that that the default mmap > size is much lower in any case until it is increased (with PRAGMA mmap_size).

[sqlite] SQLITE_MAX_MMAP_SIZE 2GB default

2019-04-18 Thread Carl Edquist
Hi there, My apologies if this has been answered in the past, but is there a reason for the ~2GB default for SQLITE_MAX_MMAP_SIZE ? #ifndef SQLITE_MAX_MMAP_SIZE ... # define SQLITE_MAX_MMAP_SIZE 0x7fff /* 2147418112 */ It makes sense for 32bit platforms, but for