오랫만에 글을 올리는군요… : ) 목적 : Page Size와 Lock Pages in Memory Large Page Size는 x64 CPU인 Westmere 부터는 1G까지 지원됩니다. 하지만 AMD의 문서를 보니 보통 2M씩 쓰는게 일반적이라고 합니다. (http://blogs.amd.com/developer/2009/02/23/huge-pages-and-numa-on-windows-operating-systems/) 하지만 실제로 Page Size가 2M로 증가하는 것은 아니고 4K짜리 512개를 모아서 2M인 것처럼 할당을 해주는거라고 합니다. 그래서 TLB에서만 이 효과를 볼 수 있다는 말인건지… 좀 햇갈립니다. The JVM or other application makes a VirtualAlloc request to allocate a chunk of memory with a flag to map it to huge pages. The OS really deals in terms of 4K pages. To return a 2MB page it must find 512 contiguous 4K pages and those will then be locked in memory (they are not candidates for paging out). By default, it will look for such a 2MB block in the memory that is local to the requesting processor. If the OS cannot find a free 2MB page in local memory, it will search in memory from other nodes in the system. 아무튼 위와 같기 때문에 이 설정이 Lock Pages in Memory였던 거군요… · Windows Server 2008/2008 R2 have Large Memory Pages enabled by default (예를 들어 1M의 메모리를 할당하는 Application이 해당 메모리를 자주쓰는 경우 TLB는 256개가 필요합니다. 하지만 2M짜리 Page Size를 이용하는 경우1~ 2번이면 가능하겠죠….) Large Page를 사용함으로 얻는 이익 : http://developer.amd.com/documentation/articles/Pages/2142006111.aspx JVM 이 Large Page Size를 사용하는 방법 : http://developer.amd.com/documentation/Articles/Pages/322006145.aspx (Lock Pages in memory 정책을 통한 설정에 추가적으로 튜닝 포인트를 언급) |