Re: out of memory - no sort
От | Scott Ribe |
---|---|
Тема | Re: out of memory - no sort |
Дата | |
Msg-id | D00A72E1-2B1F-4290-A857-4BA590F00C32@elevated-dev.com обсуждение исходный текст |
Ответ на | Re: out of memory - no sort (Don <Donald.Laurine@noaa.gov>) |
Список | pgsql-general |
On Aug 31, 2011, at 10:52 AM, Don wrote: > I had always thought that a 32bit machine could access up to 4GB. > So what is the limiting factor ? - Half of your memory space may be given over to memory-mapped I/O. Now you're down to 2GB. - Your process's executable, plus any libraries it uses, plus all the system libraries that they touch, recursively all theway down, are mapped into this space. Now you're likely down to 1.5GB or less free. - Then of course your process allocates various data structures for each row, even if it's just a huge array of pointersto each row, that would be overhead. And of course the overhead is not nearly that simple--there will be allocationsfor & pointers to varchars, and info about columns and data types, and heap data structures to keep track of allocatedvs free blocks. - Memory will be fragmented of course, so you can't even use all of what's left. So no, you can't manipulate 32M of anything except plain numbers or very simple structs in RAM in a 32-bit process. -- Scott Ribe scott_ribe@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice
В списке pgsql-general по дате отправления: