blob: d031ce6a4102de08640dc6b4c3af13a9c2d3e64a [file] [log] [blame]
Harald Welte4ff37fe2016-02-20 10:56:10 +01001== Configuring OsmoPCU
2
3Contrary to other network elements (like OsmoBSC, OsmoNITB), the
4OsmoPCU has a relatively simple minimum configuration.
5
6This is primarily because most of the PCU configuration happens
7indirectly from the BSC, who passes the configuation over A-bis OML via
8OsmoBTS and its PCU socket into OsmoPCU.
9
10A minimal OsmoPCU configuration file is provided below for your reference:
11
12.Example: Minimal OsmoPCU configuration file (`osmo-pcu.cfg`)
13----
14pcu
15 flow-control-interval 10 <1>
16 cs 2 <2>
17 alloc-algorithm dynamic <3>
Harald Welte4ff37fe2016-02-20 10:56:10 +010018 gamma 0
19----
20<1> send a BSSGP flow-control PDU every 10 seconds
21<2> start a TBF with the initial coding scheme 2
22<3> dynamically chose between single-slot or multi-slot TBF allocations
23 depending on system load
Harald Welte4ff37fe2016-02-20 10:56:10 +010024
25However, there are plenty of tuning parameters for people interested to
26optimize PCU throughput or latency according to their requirements.
27
28=== Configuring the Coding Schemes and Rate Adaption
29
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +010030As a reminder:
Harald Welte4ff37fe2016-02-20 10:56:10 +010031
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +010032- GPRS supports Coding Schemes 1-4 (CS1-4), all of them use GMSK modulation
33 (same as GSM).
34- EGPRS supports MCS1-9, where MCS1-4 is GMSK, and MCS5-9 use 8-PSK modulation.
35
36The range of Coding Schemes above only apply to RLCMAC data blocks; RLCMAC
37control blocks are always transmitted with CS1 (GMSK). Hence, CS1 is always
38supported and must be always permitted.
39
40The BSC includes a bit-mask of permitted [E]GPRS coding schemes as part of the
41A-bis OML configuration, controlled by VTY `gprs mode (none|gprs|egprs)`. This
42is passed from the BTS via the PCU socket into OsmoPCU, and the resulting set
43can be further constrained by OsmoPCU VTY configuration.
44
45Some additional OsmoPCU parameters can be set as described below.
Harald Welte4ff37fe2016-02-20 10:56:10 +010046
47==== Initial Coding Scheme
48
49You can use the `cs <1-4> [<1-4>]` command at the `pcu` VTY config node
50to set the initial GPRS coding scheme to be used. The optional second
51value allows to specify a different initial coding scheme for uplink.
52
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +010053Similarly, `mcs <1-9> [<1-9>]` can be used to set up the initial EGPRS coding
54scheme.
55
56[[max_cs_mcs]]
Harald Welte4ff37fe2016-02-20 10:56:10 +010057==== Maximum Coding Scheme
58
59You can use the `cs max <1-4> [<1-4>]` command at the `pcu` VTY config
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +010060node to set the maximum GPRS coding scheme that should be used as part of the
61rate adaption. The optional second value allows to specify a different maximum
62coding scheme for uplink.
63
64Similarly, `mcs max <1-9> [<1-9>]` can be used to set up the maximum EGPRS
65coding scheme.
66
67The actual Maximum Coding Scheme for each direction used at runtime is actually
68the result of taking the maximum value from the permitted GPRS coding schemes
69received by the BSC (or BTS) over PCUIF which is equal or lower tho the
70configured value.
71
72Example: PCUIF announces permitted MCS bit-mask (`MCS1 MCS2 MCS3 MCS4`) and
73OsmoPCU is configured `mcs max 6`, then the actual maximum MCS used at runtime
74will be `MCS4`.
Harald Welte4ff37fe2016-02-20 10:56:10 +010075
76==== Rate Adaption Error Thresholds
77
78You can use the `cs threshold <0-100> <0-100>` command at the `pcu` VTY
79config node to determine the upper and lower limit for the error rate
80percentage to use in the rate adaption. If the upper threshold is
81reached, a lower coding sheme is chosen, and if the lower threshold is
82reached, a higher coding scheme is chosen.
83
84==== Rate Adation Link Quality Thresholds
85
86You can use the `cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3
87<0-35> <0-35> cs4 <0-35>` command at the `pcu` VTY config node to tune
Jonathan Brielmaier58721eb2016-05-25 15:01:11 +020088the link quality ranges for the respective coding schemes.
Harald Welte4ff37fe2016-02-20 10:56:10 +010089
90==== Data Size based CS downgrade Threshold
91
92You can use the `cs downgrade-threshold <1-10000>` command at the `pcu`
93VTY config node to ask the PCU to down-grade the coding scheme if less
94than the specified number of octets are left to be transmitted.
95
96=== Miscellaneous Configuration / Tuning Parameters
97
98==== Downlink TBF idle time
99
100After a down-link TBF is idle (all data in the current LLC downlink
Philipp452b5332017-01-18 12:39:56 +0100101queue for the MS has been transmitted), we can keep the TBF established
Harald Welte4ff37fe2016-02-20 10:56:10 +0100102for a configurable time. This avoids having to go through a new one or
103two phase TBF establishment once the next data for downlink arrives.
104
105You can use the `dl-tbf-idle-time <1-5000>` to specify that time in
106units of milli-seconds. The default is 2 seconds.
107
108==== MS idle time
109
110Using the `ms-idle-time <1-7200>` command at the `pcu` VTY config node
111you can configure the number of seconds for which the PCU should keep
112the MS data structure alive before releasing it if there are no active
113TBF for this MS.
114
115The OsmoPCU default value is 60 seconds, which is slightly more than
116what 3GPP TS 24.008 recommends for T3314 (44s).
117
118The MS data structure only consumes memory in the PCU and does not
119require any resources of the air interface.
120
121==== Forcing two-phase access
122
Philipp452b5332017-01-18 12:39:56 +0100123If the MS is using a single-phase access, you can still force it to
Harald Welte4ff37fe2016-02-20 10:56:10 +0100124use a two-phase access using the `two-phase-access` VTY configuration
125command at the `pcu` VTY config node.
126
127=== Configuring BSSGP flow control
128
129BSSGP between SGSN and PCU contains a two-level nested flow control
130mechanism:
131
132. one global flow control instance for the overall (downlink) traffic
133 from the SGSN to this PCU
134. a per-MS flow control instance for each individual MS served by this
135 PCU
136
137Each of the flow control instance is implemented as a TBF (token bucket
138filter).
139
140==== Normal BSSGP Flow Control Tuning parameters
141
142You can use the following commands at the `pcu` VTY config node to tune
Jonathan Brielmaier58721eb2016-05-25 15:01:11 +0200143the BSSGP flow control parameters:
Harald Welte4ff37fe2016-02-20 10:56:10 +0100144
145`flow-control-interval <1-10>`::
146 configure the interval (in seconds) between subsequent flow
147 control PDUs from PCU to SGSN
148`flow-control bucket-time <1-65534>`::
149 set the target downlink maximum queueing time in centi-seconds.
150 The PCU will attempt to adjust the advertised bucket size to match this
151 target.
152
153==== Extended BSSGP Flow Control Tuning parameters
154
155There are some extended flow control related parameters at the `pcu` VTY
156config node that override the automatic flow control as specified in the
157BSSGP specification. Use them with care!
158
159`flow-control force-bvc-bucket-size <1-6553500>`::
160 force the BVC (global) bucket size to the given number of octets
161`flow-control force-bvc-leak-rate <1-6553500>`::
162 force the BVC (global) bucket leak rate to the given number of bits/s
163`flow-control force-ms-bucket-size <1-6553500>`::
164 force the per-MS bucket size to the given number of octets
165`flow-control force-ms-leak-rate <1-6553500>`::
166 force the per-MS bucket leak rate to the given number of bits/s
167
168
169=== Configuring LLC queue
170
171The downlink LLC queue in the PCU towards the MS can be tuned with a
172variety of parameters at the `pcu` VTY config node, depending on your
173needs.
174
175`queue lifetime <1-65534>`::
176 Each downlink LLC PDU is assigned a lifetime by the SGSN, which
177 is respected by the PDU *unless* you use this command to
178 override the PDU lifetime with a larger value (in centi-seconds)
179`queue lifetime infinite`::
180 Never drop LLC PDUs, i.e. give them an unlimited lifetime.
181`queue hysteresis <1-65535>`::
182 When the downlink LLC queue is full, the PCU starts dropping
183 packets. Using this parameter, we can set the lifetime
184 hysteresis in centi-seconds, i.e. it will continue discarding
185 until "lifetime - hysteresis" is reached.
186`queue codel`::
187 Use the 'CoDel' (Controlled Delay) scheduling algorithm, which
188 is designed to overcome buffer bloat. It will use a default
189 interval of 4 seconds.
190`queue codel interval <1-1000>`::
191 Use the 'CoDel' (Controlled Delay) scheduling algorithm, which
192 is designed to overcome buffer bloat. Use the specified
193 interval in centi-seconds.
194`queue idle-ack-delay <1-65535>`::
195 Delay the request for an ACK after the last downlink LLC frame
196 by the specified amount of centi-seconds.
197
198
199=== Configuring MS power control
200
201GPRS MS power control works completely different than the close MS power
202control loop in circuit-switched GSM.
203
204Rather than instructing the MS constantly about which transmit power to
205use, some parameters are provided to the MS by which the MS-based power
206control algorithm is tuned.
207
208See 3GPP TS 05.08 for further information on the algorithm and the
209parameters.
210
211You can set those parameters at the `pcu` VTY config node as follows:
212
Harald Welte4ff37fe2016-02-20 10:56:10 +0100213`gamma <0-62>`::
214 Set the gamma parameter for MS power control in units of dB.
215
Pau Espin Pedrolfe8de452021-02-09 18:47:34 +0100216Parameter `ALPHA` is set on the BSC VTY configuration file on a per-BTS basis,
217and forwarded by OsmoPCU to the MS through the SI13 received from the former
218over PCUIF. OsmoPCU VTY command `alpha <0-10>` overrides the value received over
219PCUIF to keep backward compatibility with existing config files, but it is
220currently deprecated and its use is discouraged; one should configure it per-BTS
221in OsmoBSC VTY instead.
Harald Welte4ff37fe2016-02-20 10:56:10 +0100222
Pau Espin Pedrolced5c1f2021-01-29 15:52:44 +0100223=== Configuring Network Assisted Cell Change (NACC)
224
225Network Assisted Cell Change, defined in 3GPP TS 44.060 sub-clause 8.8, is a
226feature providing the MS aid when changing to a new cell due to autonomous
227reselection. In summary, the MS informs the current cell its intention to change
228to a new target cell, and the network decides whether to grant the intended cell
229change or order a change to another neighbor cell. It also provides several
230System Informations of the target cell to the MS to allow for quicker
231reselection towards it.
232
233OsmoPCU will automatically provide the required neighbor System Information when
234the MS requests NACC towards a target cell also under the management of the same
235OsmoPCU instance, since it already has the System Information of all BTS under
236their control, obtained through PCUIF when the BTS registers against OsmoPCU, so
237no specific user configuration is required here.
238
Pau Espin Pedrol44768f22021-02-02 13:11:30 +0100239In general, OsmoPCU requires to gather the information from somewhere else
240before being able to provide it to the MS requesting the NACC.
Pau Espin Pedrolced5c1f2021-01-29 15:52:44 +0100241
242If OsmoPCU fails to gather the System Information, it will simply answer the MS
243allowing the proposed changed but without previously providing the System
244Information of the target cell.
245
246==== Neighbor Address Resolution
247
248First of all, it needs to translate the <ARFCN + BSIC> identity of the target
249cell to change to, provided by the MS, into an identity that the Core Network
250can use and understand to identify the target cell, which happens to be a key
251composed of <RAI + Cell Identity>. This key is also named conveniently as
252CGI-PS, since it actually equals to the Circuit Switch CGI + RAC.
253
254In order to apply this target cell identity translation, OsmoPCU uses the
255OsmoBSC Neighbor Resolution CTRL interface (see OsmoBSC User Manual), since the
256BSC is the node holding all the neighbor related information.
257By default, the use of this interface is not configured and hence disabled in
258OsmoPCU. As a result, until configured, the network won't be able to provide the
259System Information to the MS prior to allowing the change during NACC against
260remote cells, which means the cell change will take longer to complete. In order
261to configure the interface, the OsmoBSC IP address and port to connect to must
262be configured in OsmoPCU VTY.
263
264These neighbor address resolutions (<ARFCN + BSIC> => <RAI + CI>) are by default
265cached for a while in order to avoid querying the BSC frequently and, as a
266result, optimizing the resolution time too.
267
268.Example: Configure Neighbor Resolution CTRL interface against OsmoBSC
269----
270pcu
271 neighbor resolution 172.18.13.10 4248 <1>
272 timer X1 500 <2>
273 timer X0 60 <3>
274----
275<1> Port 4248 is the default and hence could be omitted in this case
276<2> Time out if the BSC doesn't answer our CTRL resolution request after 500 ms
277<3> Keep resolved neighbor addresses cached for 60 seconds
278
279==== System Information Resolution
280
281Once OsmoPCU gains knowledge of the target cell's address in the Core Network,
Pau Espin Pedrol44768f22021-02-02 13:11:30 +0100282it can query its System Information.
Pau Espin Pedrolced5c1f2021-01-29 15:52:44 +0100283
Pau Espin Pedrol44768f22021-02-02 13:11:30 +0100284OsmoPCU will gather the requested System Information of target cells under its
285control without need for any external query, since the System Information of all
286BTSs it manages are received over PCUIF and stored internally in OsmoPCU.
287
288For those targets cells not managed by the OsmoPCU instance, the query is
289accomplished by using RIM procedures (NACC RAN-INFO application) over the Gb
290interface against the SGSN that OsmoPCU is connected to. In its turn, the SGSN
291will potentially forward this query to the PCU serving the target cell, which
292will provide back the System Information of that cell.
293
294The System Information received from external PCUs over RIM are by default
Pau Espin Pedrolced5c1f2021-01-29 15:52:44 +0100295cached for a while in order to avoid querying the SGSN frequently and, as a
296result, optimizing the resolution time too.
297
298.Example: Configure System Information resolution
299----
300pcu
301 timer X2 500 <1>
302 timer X11 60 <2>
303----
304<1> Time out if the SGSN doesn't answer our RIM RAN-INFO request request after 500 ms
305<2> Keep resolved remote neighbor System Information cached for 60 seconds
306
307
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +0100308=== GPRS vs EGPRS considerations
Harald Welte4ff37fe2016-02-20 10:56:10 +0100309
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +0100310==== Configuration
Harald Welte4ff37fe2016-02-20 10:56:10 +0100311
Pau Espin Pedrold3123ea2021-01-05 13:26:34 +0100312OsmoPCU can be configured to either:
313
314- Allocate only GPRS TBFs to all MS (no EGPRS)
315- Allocate EGPRS TBFs to EGPRS capable phones while still falling back to
316 allocating GPRS TBFs on GPRS-only capable MS.
317
318These two different modes of operation are selected by properly configuring the
319Coding Schemes (see <<max_cs_mcs>>).
320
321The first mode of operation (GPRS-only for all MS) can be accomplished
322configuring OsmoPCU so that the resulting MCS set is empty. This can be done in
323two ways:
324
325- Announcing an empty MCS bit-mask over PCUIF to OsmoPCU:
326 That's actually done automatically by OsmoBSC on BTS with VTY config set to
327 `gprs mode gprs`.
328- Configuring OsmoPCU to force an empty set by using VTY command `mcs max 0`.
329
330Hence, if the resulting MCS bit-mask is not empty, (BSC configuring the BTS with
331`gprs mode egprs` and OsmoPCU VTY containing something other than 'mcs max 0'),
332EGPRS TBFs will be allocated for all MS announcing EGPRS capabilities.
333
334It is important to remark that in order to use MCS5-9, the BTS must support
3358-PSK modulation. Nevertheless, in case 8-PSK is not supported by the BTS, one
336can still enable EGPRS and simply make sure 8-PSK MCS are never used by
337configuring OsmoPCU with `mcs max 4 4`.
338
339Similarly, a BTS may support 8-PSK modulation only on downlink, since it is
340easier to implement than the uplink, together with the fact that higher downlink
341throughput is usually more interesting from user point of view. In this
342scenario, OsmoPCU can be configured to allow for full MCS range in downlink
343while still preventing use of 8-PSK on the uplink: `mcs max 9 4`.
344
345Some other interesting configurations to control use of EGPRS in the network
346which lay outside OsmoPCU include:
347
348- If `osmo-bts-trx` together with `osmo-trx` is used, remember to enable EGPRS
349 support (OsmoTRX VTY `egprs enable`).
350
351- It is possible to improve EGPRS performance (in particular, the TBF
352 establishment timing) a bit by enabling 11-bit Access Burst support. This
353 allows EGPRS capable phones to indicate their EGPRS capability, establishment
354 cause, and multi-slot class directly in the Access Burst (OsmoTRX VTY
355 `ext-rach enable`, OsmoBSC VTY `gprs egprs-packet-channel-request`).
356
357NOTE: If you enable MCS5-9 you will also need an 8-PSK capable OsmoBTS+PHY,
358which means `osmo-bts-sysmo` or `osmo-bts-litecell15` with their associated PHY,
359or `osmo-bts-trx` with `osmo-trx` properly configured.
360
361==== GPRS+EGPRS multiplexing
362
363Both EGPRS and GPRS-only capable MS can be driven concurrently in the same PDCH
364timeslot by the PCU, hence no special configuration is required per timeslot
365regarding this topic; OsmoPCU scheduler takes care of the specific requirements
366when driving MS with different capabilities.
367
368These specific requirements translate to some restrictions regarding which
369Coding Schemes can be used at given frame numbers, and hence which kind of
370RLCMAC blocks can be sent, which means serving a GPRS-only MS in a PDCH may end
371up affecting slightly the downlink throughput of EGPRS capable MS.
372
373Throughput loss based on MS capabilities with TBF attached to a certain PDCH
374timeslot:
375
376All UEs are EGPRS capable::
377 No throughput loss, since all data is sent using EGPRS, and EGPRS control
378 messages are used when appropriate.
379
380All UEs are GPRS-only (doesn't support EGPRS)::
381 No throughput loss, since all data and control blocks use GPRS.
382
383Some UEs are GPRS-only, some EGPRS::
384In general EGPRS capable UEs will use EGPRS, and GPRS-only UEs will use GPRS,
385with some restrictions affecting throughput of EGPRS capable UEs:
386- Whenever a GPRS-only MS is to be polled to send uplink data to PCU, then a
387downlink RLCMAC block modulated using GMSK must be sent, which means that if the
388scheduler selects a EGPRS MS for downlink on that block it will force sending of
389data with MCS1-4 (if it's new data, if it's a retransmission it cannot be
390selected since MCS from original message cannot be changed). In the worst case
391if no control block needs to be sent or no new data in MCS1-4 is available to
392send, then an RLCMAC Dummy Block is sent.
393- For synchronization purposes, each MS needs to receive an RLCMAC block which
394it can fully decode at least every 360ms, which means the scheduler must enforce
395a downlink block in CS1-4 every 360ms, that is, every 18th RLCMAC block. In
396general this is not a big issue since anyway all control RLCMAC blocks are
397encoded in CS1, so in case any control block is sent from time to time it's
398accomplished and there's no penalty. However, if only EGPRS downlink data is sent
399over that time frame, then the scheduler will force sending a RLCMAC Dummy
400Block.