ORA-4030 Error during SQL Loader –mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***

I got these error during sqlldr process.

In the trace file, I’m seeing lot of mmap error. This process using tons of map entries.

mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B
mmap(offset=207343616, len=8192) failed with errno=12 for the file oracle***1B

So the system was running out of map entries. Default number of map entries is 65536 (number of)
The default realfree allocator pagesize is 64KB.So you can use up to 4GB memory for process.

But increasing it to 262144 ,you can use up to 16GB memory.

more /proc/sys/vm/max_map_count
$ sysctl -w vm.max_map_count=262144

Second option on the database side, you can set parameter _realfree_heap_pagesize_hint=262144 and _use_realfree_heap=TRUE

Advertisements