[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8261549: Adjust memory size in MTLTexurePool.m [v2]
From:       Phil Race <prr () openjdk ! java ! net>
Date:       2021-06-07 16:43:16
Message-ID: 022jr-sfk83ZdmFjdUBMz5paUfwEIsQXQ6CiWeJWwTI=.866b50fa-79b0-46cc-ada2-3a9b9b0da2f2 () github ! com
[Download RAW message or body]

On Mon, 7 Jun 2021 10:39:26 GMT, Alexey Ushakov <avu@openjdk.org> wrote:

> > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m line \
> > 328: 
> > > 326:     if (_maxPoolMemory < MAX_POOL_MEMORY) {
> > > 327:         _maxPoolMemory = MAX_POOL_MEMORY;
> > > 328:     }
> > 
> > The Apple 5K retina is 5120‑by‑2880 pixels
> > 
> > So we start off with a number that is too small
> > #define SCREEN_MEMORY_SIZE_4K (4096*2160*4) //~33,7 mb
> > and then divide it by 2
> > #define MAX_POOL_MEMORY SCREEN_MEMORY_SIZE_4K/2
> > 
> > and I have no idea what a typical size is for 
> > self.device.recommendedMaxWorkingSetSize
> > which we are also dividing by 2.
> > 
> > So I have no idea what the logic is behind all these numbers.
> 
> > The Apple 5K retina is 5120‑by‑2880 pixels
> > 
> > So we start off with a number that is too small
> > #define SCREEN_MEMORY_SIZE_4K (4096_2160_4) //~33,7 mb
> > and then divide it by 2
> > #define MAX_POOL_MEMORY SCREEN_MEMORY_SIZE_4K/2
> 
> I didn't touch this number here, they worked well within our EA testing cycles. So, \
> I decided to use it as a fallback. We can extend it to 5K though. 
> > and I have no idea what a typical size is for
> > self.device.recommendedMaxWorkingSetSize
> > which we are also dividing by 2.
> 
> This size typically much much bigger than  SCREEN_MEMORY_SIZE_4K 
> - 4GB on Radeon Pro 560X 4GB
> - 1.5GB Intel UHD Graphics 630 1536 MB  (MBP 2019)
> Looks like it corresponds to the amount of VRAM however the doc says that OS may \
> set another value 
> > An approximation of how much memory, in bytes, this device can use with good \
> > performance.
> 
> I don't think that it's a good idea to take all the recommended VRAM, so decided to \
> divide it by 2. 
> > 
> > So I have no idea what the logic is behind all these numbers.

OK. Can you add some of this info to the bug report.
Notabkly the typical size for self.device.recommendedMaxWorkingSetSize

-------------

PR: https://git.openjdk.java.net/jdk/pull/4279


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic