I have an SSD which has an internal page size of 8k but linux only supports 4k page sizes. My question is, when using java memory mapped files would I get better performance reading/writing in 4k or 8k blocks at a time. I am building a disk based hash map using memory mapped files where each bucket is either a 4k or 8k block. if the ssd is going to read 8k even if I am only accessing the first 4k of it then it seems I should use 8k blocks as I am wasting half my reads otherwise. However as linux only works in 4k blocks I dont know if there will be an overhead of reading two pages from the OSes point of view even if its only one page from the ssds point of view if you get my jist.
Asked
Active
Viewed 524 times
1 Answers
0
You could avoid the need to pick a block size altogether by using open addressing. Then let the OS and hardware do the job of figuring out the most efficient way to perform each operation.

rocketblast
- 156
- 7