Re: Ignite data region off-heap allocation

2023-07-24 Thread Raymond Wilson
Thanks for the confirmation. On Mon, Jul 24, 2023 at 4:40 PM Pavel Tupitsyn wrote: > > If this flag is true will Ignite proactively allocate and use all pages > in a data region, rather than incrementally? > > LazyMemoryAllocation means whether memory for DataRegion will be allocated > only

Re: Ignite data region off-heap allocation

2023-07-23 Thread Pavel Tupitsyn
> If this flag is true will Ignite proactively allocate and use all pages in a data region, rather than incrementally? LazyMemoryAllocation means whether memory for DataRegion will be allocated only when the first cache is created in that region (when true), or immediately (when false)

Re: Ignite data region off-heap allocation

2023-07-19 Thread Raymond Wilson
Just FYI, we have held off any memory pressure changes in the meantime while we continue to investigate the memory issues we have. On Tue, 18 Jul 2023 at 9:07 AM, Raymond Wilson wrote: > Hi Pavel, > > This area is confusing. There is no indication that the memory pressure > applies to any

Re: Ignite data region off-heap allocation

2023-07-17 Thread Raymond Wilson
Hi Pavel, This area is confusing. There is no indication that the memory pressure applies to any individual object or allocation, so there is clearly no association between memory pressure and any particular resource. I get your argument that .Net can 'see' allocated memory. What is unclear is

Re: Ignite data region off-heap allocation

2023-07-11 Thread Pavel Tupitsyn
> I can’t see another way of letting . Net know that it can’t have access to all the ‘free’ memory in the process You don't need to tell .NET how much memory is currently available. It is the job of the OS. .NET can "see" the size of the unmanaged heap. To quote another explanation [1]: > The

Re: Ignite data region off-heap allocation

2023-07-11 Thread Raymond Wilson
How do Ignite .Net server nodes manage this memory issue in other projects? On Tue, Jul 11, 2023 at 5:32 PM Raymond Wilson wrote: > Oops, commutes => committed > > On Tue, 11 Jul 2023 at 4:34 PM, Raymond Wilson > wrote: > >> I can’t see another way of letting . Net know that it can’t have

Re: Ignite data region off-heap allocation

2023-07-10 Thread Raymond Wilson
Oops, commutes => committed On Tue, 11 Jul 2023 at 4:34 PM, Raymond Wilson wrote: > I can’t see another way of letting . Net know that it can’t have access to > all the ‘free’ memory in the process when a large slab of that is spoken > for in terms of memory commutes to Ignite data regions. > >

Re: Ignite data region off-heap allocation

2023-07-10 Thread Raymond Wilson
I can’t see another way of letting . Net know that it can’t have access to all the ‘free’ memory in the process when a large slab of that is spoken for in terms of memory commutes to Ignite data regions. In the current setup, as time goes on and Ignite progressively fills the allocated cache ram

Re: Ignite data region off-heap allocation

2023-07-10 Thread Pavel Tupitsyn
Are you sure this is necessary? GC.AddMemoryPressure documentation [1] states that this will "improve performance only for types that exclusively depend on finalizers". [1] https://learn.microsoft.com/en-us/dotnet/api/system.gc.addmemorypressure?view=net-7.0 On Tue, Jul 11, 2023 at 1:02 AM

Re: Ignite data region off-heap allocation

2023-07-10 Thread Raymond Wilson
I'm making changes to add memory pressure to the GC to take into account memory committed to the Ignite data regions as this will be unmanaged memory allocations from the perspective of the GC. I don't call seeing anything related to this for .Net clients in the documentation. Are you aware of

Re: Ignite data region off-heap allocation

2023-07-10 Thread Raymond Wilson
Thanks Pavel, this makes sense. Querying the .Net Process instance shows this as the difference between PagesMemorySize (includes committed) versus WorkingSet (includes uses/written to) size. Raymond.

Re: Ignite data region off-heap allocation

2023-07-10 Thread Pavel Tupitsyn
It is similar with .NET, try the following code: Console.WriteLine("Press any key to allocate 100MB"); Console.ReadKey(); var bytes = new byte[100_000_000]; // At this point Linux reports ~6MB of memory used by the process. Console.WriteLine("Array allocated, press any key to fill with 1s");

Re: Ignite data region off-heap allocation

2023-07-10 Thread Raymond Wilson
Hi Pavel, I want to say this should be included in the ‘used’ memory for a process, but perhaps that is not correct. Raymond. On Mon, 10 Jul 2023 at 5:07 PM, Pavel Tupitsyn wrote: > Hi Raymond, > > "allocated=94407MB" reported by Ignite is "committed" memory - requested > from the OS, but not

Re: Ignite data region off-heap allocation

2023-07-09 Thread Pavel Tupitsyn
Hi Raymond, "allocated=94407MB" reported by Ignite is "committed" memory - requested from the OS, but not entirely used/touched. See - https://github.com/apache/ignite/blob/df685afb08e3c2297adb8fc6df435a7310e95e50/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java#L2369 -

Ignite data region off-heap allocation

2023-07-08 Thread Raymond Wilson
Hi, We have an Ignite node reporting off-heap data region allocation like this in the logs: ^-- Off-heap memory [used=37077MB, free=60.81%, allocated=94407MB] The same process (.Net 7 running in a Kubernetes pod with 124Gb allocated out of 128Gb available on the node), reports this level of