agoncharuk commented on a change in pull request #7984:
URL: https://github.com/apache/ignite/pull/7984#discussion_r524330324



##########
File path: 
modules/core/src/main/java/org/apache/ignite/configuration/DefragmentationConfiguration.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public final class DefragmentationConfiguration implements Serializable {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     *
+     */
+    public static final long DFLT_MAPPIN_REGION_SIZE = 256L * 1024 * 1024;
+
+    /**
+     *
+     */
+    private long regionSize = 
DataStorageConfiguration.DFLT_DATA_REGION_MAX_SIZE;
+
+    /**
+     *
+     */
+    private long mappingRegionSize = DFLT_MAPPIN_REGION_SIZE;

Review comment:
       Can we calculate defragmentation regions automatically? For example, the 
mapping region size can be calculated as max(size of the cache) * C (we store a 
link->link mapping, so the region size can be estimated pretty much 
accurately). 
   For the defragmentation region size, we can calculate DS = Sum(all data 
region sizes in the node configuration). Then, assuming defragmentation runs 
sequentially per cache/cache group, we can split the DS proportionally between 
the original cache data region, the defragmentation data region, and mapping 
data region.
   
   If this is something viable, I would move these configuration parameters to 
system properties so that user does not have to configure anything at all.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to