generated from divnix/digga
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
758e7bd
commit 43d2cb3
Showing
2 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
nixos/profiles/services/sicp-staging/_patches/app-docker-disable-swappiness.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogCompare.java b/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogCompare.java | ||
index 1225612..f51018a 100644 | ||
--- a/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogCompare.java | ||
+++ b/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogCompare.java | ||
@@ -132,8 +132,7 @@ public class HogCompare implements Consumer<HogEntry> { | ||
new HostConfig() | ||
.withCpuPeriod(100000L) | ||
.withCpuQuota(100000L) | ||
- .withMemory(1024L * 1024 * 1024) // load scenarios require huge memory | ||
- .withMemorySwappiness(0L)) | ||
+ .withMemory(1024L * 1024 * 1024)) // load scenarios require huge memory | ||
.exec() | ||
.getId(); | ||
|
||
diff --git a/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogTrigger.java b/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogTrigger.java | ||
index e3457e2..f68d5bf 100644 | ||
--- a/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogTrigger.java | ||
+++ b/packages/app/src/main/java/cn/edu/nju/sicp/contests/hog/HogTrigger.java | ||
@@ -125,8 +125,7 @@ public class HogTrigger implements Consumer<Submission> { | ||
new HostConfig() | ||
.withCpuPeriod(100000L) | ||
.withCpuQuota(100000L) | ||
- .withMemory(1024L * 1024 * 1024) // 1G RAM | ||
- .withMemorySwappiness(0L)) | ||
+ .withMemory(1024L * 1024 * 1024)) // 1G RAM | ||
.exec() | ||
.getId(); | ||
|
||
diff --git a/packages/app/src/main/java/cn/edu/nju/sicp/listeners/GradeSubmissionListener.java b/packages/app/src/main/java/cn/edu/nju/sicp/listeners/GradeSubmissionListener.java | ||
index 192327a..85696d6 100644 | ||
--- a/packages/app/src/main/java/cn/edu/nju/sicp/listeners/GradeSubmissionListener.java | ||
+++ b/packages/app/src/main/java/cn/edu/nju/sicp/listeners/GradeSubmissionListener.java | ||
@@ -166,8 +166,7 @@ public class GradeSubmissionListener implements ChannelAwareMessageListener { | ||
.withHostConfig(new HostConfig() | ||
.withCpuPeriod(100000L) | ||
.withCpuQuota(100000L) | ||
- .withMemory(256L * 1024 * 1024) | ||
- .withMemorySwappiness(0L)) | ||
+ .withMemory(256L * 1024 * 1024)) | ||
.exec() | ||
.getId(); | ||
logStopWatch.accept(String.format("Created Docker container.\n ID: %s\n RF: %s\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters