Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] Deprecate memory over-acquiring #7384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@

import org.apache.spark.memory.TaskMemoryManager;
import org.apache.spark.task.TaskResources;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.Map;

public final class ReservationListeners {
private static final Logger LOG = LoggerFactory.getLogger(ReservationListeners.class);

public static final ReservationListener NOOP =
new ManagedReservationListener(
new NoopMemoryTarget(), new SimpleMemoryUsageRecorder(), new Object());
Expand All @@ -45,6 +49,12 @@ private static ReservationListener create0(
String name, Spiller spiller, Map<String, MemoryUsageStatsBuilder> mutableStats) {
// Memory target.
final double overAcquiredRatio = GlutenConfig.getConf().memoryOverAcquiredRatio();
if (overAcquiredRatio > 0) {
LOG.warn(
"Deprecated config option "
+ GlutenConfig.COLUMNAR_MEMORY_OVER_ACQUIRED_RATIO().key()
+ " is used.");
}
final long reservationBlockSize = GlutenConfig.getConf().memoryReservationBlockSize();
final TaskMemoryManager tmm = TaskResources.getLocalTaskContext().taskMemoryManager();
final TreeMemoryTarget consumer =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1323,11 +1323,11 @@ object GlutenConfig {
val COLUMNAR_MEMORY_OVER_ACQUIRED_RATIO =
buildConf("spark.gluten.memory.overAcquiredMemoryRatio")
.internal()
.doc("If larger than 0, Velox backend will try over-acquire this ratio of the total " +
"allocated memory as backup to avoid OOM.")
.doc("(Deprecated) If larger than 0, Velox backend will try over-acquire this ratio " +
"of the total allocated memory as backup to avoid OOM.")
.doubleConf
.checkValue(d => d >= 0.0d, "Over-acquired ratio should be larger than or equals 0")
.createWithDefault(0.3d)
.createWithDefault(0.0d)

val COLUMNAR_MEMORY_RESERVATION_BLOCK_SIZE =
buildConf("spark.gluten.memory.reservationBlockSize")
Expand Down
Loading