update
This commit is contained in:
parent
b88c2876b7
commit
a742846d2a
|
|
@ -125,9 +125,13 @@ if ($_SERVER["REQUEST_METHOD"] === "POST" && $_POST["action"] === "add") {
|
||||||
$data[] = $new;
|
$data[] = $new;
|
||||||
file_put_contents($jsonFile, json_encode($data, JSON_PRETTY_PRINT));
|
file_put_contents($jsonFile, json_encode($data, JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
$alloc = allocateCore($id);
|
$alloc = getServiceCore($id);
|
||||||
$node = $alloc["node"];
|
if ($alloc === null) {
|
||||||
$core = $alloc["cpu"];
|
$alloc = allocateCore($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$core = (int)$alloc["cpu"];
|
||||||
|
$node = (int)$alloc["node"];
|
||||||
|
|
||||||
$ffmpeg = 'numactl --cpunodebind=' . $node .
|
$ffmpeg = 'numactl --cpunodebind=' . $node .
|
||||||
' --membind=' . $node .
|
' --membind=' . $node .
|
||||||
|
|
@ -220,12 +224,18 @@ if ($_SERVER["REQUEST_METHOD"] === "POST" && $_POST["action"] === "edit") {
|
||||||
];
|
];
|
||||||
|
|
||||||
$new = $row;
|
$new = $row;
|
||||||
$core = getServiceCore($id);
|
$alloc = getServiceCore($id);
|
||||||
if ($core === null) {
|
if ($alloc === null) {
|
||||||
$core = allocateCore($id);
|
$alloc = allocateCore($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ffmpeg = 'taskset -c ' . $core . ' ffmpeg -hide_banner -loglevel info \
|
$core = (int)$alloc["cpu"];
|
||||||
|
$node = (int)$alloc["node"];
|
||||||
|
|
||||||
|
|
||||||
|
$ffmpeg = 'numactl --cpunodebind=' . $node .
|
||||||
|
' --membind=' . $node .
|
||||||
|
' taskset -c ' . $core . ' ffmpeg -hide_banner -loglevel info \
|
||||||
-thread_queue_size 65536 \
|
-thread_queue_size 65536 \
|
||||||
-fflags +genpts+discardcorrupt+nobuffer \
|
-fflags +genpts+discardcorrupt+nobuffer \
|
||||||
-readrate 1.0 \
|
-readrate 1.0 \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue