You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-10Lines changed: 41 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,9 @@ An SLEdgeScale serverless function consists of a shared library (\*.so) and a JS
82
82
83
83
### Start the SLEdgeScale Server
84
84
We need to export some environment variables before start the server. The commonly used environment variables are:
85
+
85
86
`SLEDGE_DISABLE_PREEMPTION`: Disables the timer that sends a SIGALRM signal every 5 ms for preemption. Must disable in SLEdgeScale.
87
+
86
88
`SLEDGE_DISPATCHER`: Specifies the dispatcher policy. There are seven types of dispatchers:
87
89
- SHINJUKU: Requests are enqueued to each dispatcher's typed queue.
88
90
- EDF_INTERRUPT: The dispatcher policy used by SLEdgeScale.
@@ -92,27 +94,56 @@ We need to export some environment variables before start the server. The common
92
94
- RR: The dispatcher selects a worker in a round-robin fashion.
93
95
- JSQ: The dispatcher selects the worker with the shortest queue to enqueue a request.
94
96
95
-
`SLEDGE_DISABLE_GET_REQUESTS_FROM_GQ`: Disable workers fetching requests from the global queue. Must be disabled if the dispatcher policy is not set to TO_GLOBAL_QUEUE.
97
+
`SLEDGE_DISABLE_GET_REQUESTS_FROM_GQ`: Disable workers fetching requests from the global queue. Must be disabled if the dispatcher policy is not set to TO_GLOBAL_QUEUE.
98
+
96
99
`SLEDGE_SCHEDULER`: Specifies the scheduler policy. There are two types of schedulers:
97
100
- FIFO: First-In-First-Out. Must use the TO_GLOBAL_QUEUE dispatch policy when using FIFO.
98
101
- EDF: Earliest-deadline-first.
99
102
100
103
`SLEDGE_FIFO_QUEUE_BATCH_SIZE`: When using the FIFO scheduler, specifies how many requests are fetched from the global queue to the local queue each time the local queue becomes empty.
104
+
101
105
`SLEDGE_DISABLE_BUSY_LOOP`: Disables the worker’s busy loop for fetching requests from the local or global queue. The busy loop must be enabled if the dispatcher policy is set to `TO_GLOBAL_QUEUE`.
106
+
102
107
`SLEDGE_DISABLE_AUTOSCALING`: Currently not used;always set to `true`.
103
-
`SLEDGE_SIGALRM_HANDLER`: Always set to `TRIAGED` to avoid performance issues.
108
+
104
109
`SLEDGE_DISABLE_EXPONENTIAL_SERVICE_TIME_SIMULATION`: For the `hash` function, enabling this option allows SLEdgeScale to estimate the function’s execution time based on the input number. For other types of functions, this should be disabled.
110
+
105
111
`SLEDGE_FIRST_WORKER_COREID`: Specifies the ID of the first core for the worker thread. Cores 0–2 are reserved, so numbering should start from 3.
106
-
`SLEDGE_NWORKERS`: Specifies the total number of workers in the system.
107
-
`SLEDGE_NLISTENERS`: Specifies the total number of dispachers in the system.
108
-
`SLEDGE_WORKER_GROUP_SIZE`: Specifies SLEdgeScale calculates the number of workers in each worker group based on this value.
109
-
export SLEDGE_SCHEDULER=$scheduler_policy
110
-
#export SLEDGE_DISPATCHER=DARC
111
-
export SLEDGE_DISPATCHER=$dispatcher_policy
112
-
export SLEDGE_SCHEDULER=$scheduler_policy
113
-
#export SLEDGE_DISPATCHER=EDF_INTERRUPT
112
+
113
+
`SLEDGE_NWORKERS`: The total number of workers in the system.
114
+
115
+
`SLEDGE_NLISTENERS`: The total number of dispachers in the system.
116
+
117
+
`SLEDGE_WORKER_GROUP_SIZE`: The number of workers in each worker group. Its value is equal to SLEDGE_NWORKERS / SLEDGE_NLISTENERS
118
+
119
+
`SLEDGE_SANDBOX_PERF_LOG`: Server log file path
120
+
121
+
Now use the following example script to start server side:
Now run the sledgert binary, passing the JSON file of the serverless function we want to serve. Because serverless functions are loaded by SLEdge as shared libraries, we want to add the `applications/` directory to LD_LIBRARY_PATH.
0 commit comments