#16669·alluxio

Local Cache with large page size cause Out of heap memory

Author: LuQQiuCreated Dec 23, 2022Updated Apr 27, 2026
Labelsarea-clientpriority-mediumtype-bugtask-mediumstale

Alluxio Version: Dora branch - 2.10.0-SNAPSHOT

Describe the bug Local cache hit read is zero copy. Local cache with FUSE SDK read is double copy at least:

byte[] page = LocalCacheFileInStream.readExternalPage(position, readType);

  • UfsFileInStream.create()
  • UfsFileInStream.seek()
  • byte[] page = new byte[pageSize]; ← first copy, full page size = 512MB
  • ByteBuffer.wrap(page)
  • UfsFileInStream.read(ByteBuffer)
    • byte[] byteArray = new byte[len]; <-- second copy, full page size = 512MB
    • read(byte[] b, int off, int len)

To Reproduce Change page size to 512MB launch Fuse SDK with local cache Run FIO big file read: fio --name=sequentialread --rw=read --bs=4m --numjobs=1 --filesize=1g -direct=1 --group_reporting --nrfiles 1

read failed because out of heap memory

Expected behavior A clear and concise description of what you expected to happen.

Urgency Describe the impact and urgency of the bug.

Are you planning to fix it Please indicate if you are already working on a PR.

Additional context Add any other context about the problem here.