-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not recreate network and IPC namespaces for each judge
Public [1] and private reports suggest doing so is causing scalability issues with current Ubuntu LTS (22.04) kernel (5.15). Note that the safety of this change depends on Identity::dynamic (which implies `RemoveIPC=true`) or we'd leave some attack vectors.
- Loading branch information
Showing
9 changed files
with
109 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,11 @@ | ||
# This file need to be copied to | ||
# opoj-empty-ns-0.service, opoj-empty-ns-1.service, ... for each | ||
# possible runner_id and adjusted. | ||
|
||
[Unit] | ||
Description=Empty namespace holder (runner %I) | ||
|
||
[Service] | ||
ExecStart=/bin/sleep infinity | ||
PrivateIPC=true | ||
PrivateNetwork=true |
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
[Unit] | ||
Description=Slice for OJ (runner X) | ||
[email protected] | ||
|
||
[Slice] | ||
# Normally we expect solutions judged with one CPU core. | ||
|
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,10 @@ | ||
from urllib.request import urlopen | ||
|
||
urlopen("https://acm.xidian.edu.cn/") | ||
|
||
try: | ||
while True: | ||
a, b = map(int, input().split()) | ||
print(a + b) | ||
except EOFError: | ||
pass |
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
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,6 @@ | ||
language = "python" | ||
time_limit = 1 | ||
memory_limit = "256 MiB" | ||
testcase_dir = "problem/aplusb" | ||
src = "code/aplusb/net.py" | ||
expect = "RunError" |
Oops, something went wrong.
b912335
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot the bibliography.
[1] : https://blog.pintia.cn/2018/11/15/judger-performance-tuning/