Populating huge data structures from disk

Paul Rubin http
Tue Nov 6 19:31:51 EST 2007


"Michael Bacarella" <mbac at gpshopper.com> writes:
> > The way I do it is run a separate process that mmaps the file and
> > reads one byte from each page every half hour or so.  You are right
> > that it makes a huge difference.
> 
> Why not just disable swap?

The system is demand paged.  If swap is disabled, pages can still get
released from memory since they can be paged back in later.  Remember
we are talking about an actual disk file (persistent data) that
happens to be mmap'ed into a running program.  So paging would be
to the file system and not the swap area.



More information about the Python-list mailing list