{'fraction_non_alphanumeric': 0.03326140729435293, 'fraction_numerical': 0.011630966791221515, 'mean_word_length': 4.401364411597498, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Delay-Optimal Packet Scheduler for M2M Uplink

In this paper, we present a delay-optimal packet scheduler for processing the M2M uplink traffic at the M2M application server (AS). Due to the delay-heterogeneity in uplink traffic, we classify it broadly into delay-tolerant and delay-sensitive traffic. We then map the diverse delay requirements of each class to sigmoidal functions of packet delay and formulate a utility-maximization problem that results in a proportionally fair delay-optimal scheduler. We note that solving this optimization problem is equivalent to solving for the optimal fraction of time each class is served with (preemptive) priority such that it maximizes the system utility. Using Monte-Carlo simulations for the queuing process at AS, we verify the correctness of the analytical result for optimal scheduler and show that it outperforms other state-of-the-art packet schedulers such as weighted round robin, max-weight scheduler, fair scheduler and priority scheduling. We also note that at higher traffic arrival rate, the proposed scheduler results in a near-minimal delay variance for the delay-sensitive traffic which is highly desirable. This comes at the expense of somewhat higher delay variance for delay-tolerant traffic which is usually acceptable due to its delay-tolerant nature.


I. INTRODUCTION
Over the past few years, the global Machine-to-Machine (M2M) communications has witnessed a significant growth due to its multitude of industrial use-cases such as industrial automation, Smart Grid, Digital billboards etc [1]. The M2M uplink is of more practical interest than the downlink as the typical use-case consists of device monitoring and control functions. M2M devices generate sporadic data with small payload size, typically few hundred bytes and therefore, the focus is on availability and reliability as opposed to the high data rate requirement of human-oriented-services. The traffic arrival rate, payload size and delay requirements of M2M uplink traffic differ vastly for different M2M use-cases. For instance, consider the smart-grid traffic [2] originating from the smart meters in residential homes. As per the UCA OpenSG specification (described in [3]), the meter reading reports are delay-tolerant with maximum latency requirement greater than 60 s, average payload of 1.2 kB and arrival rate of 6 messages/day/device. On the other extreme is the delaysensitive real-time pricing messages with latency requirement of less than 3 s, payload of less than 25 B and arrival rate of 96 messages/day/device [3]. This extreme heterogeneity in This research is based upon work supported by the National Science Foundation under Grant No. 1134843. traffic characteristics makes it is imperative to design delayaware packet schedulers for serving the M2M uplink traffic [4].
Most of the existing M2M packet schedulers are designed for specific wireless technology such as LTE and are heuristic schedulers (see [5] and references therein). Most of the LTE packet schedulers use some variants of Access Grant Time Interval scheme for allocating fixed or dynamic access grants over periodic time intervals to M2M devices. Another line of work focuses on optimal scheduling algorithms specifically for real-time embedded systems (see [6] and references therein). The drawback of these schemes is that they assume the arrival and service time of packets are known apriori. Therefore, they cannot be used for scheduling M2M traffic which is typically random with different delay requirements for different traffic classes.
Recently, packet scheduling heuristics that incorporate the heterogeneity in M2M uplink using utility functions have been proposed in [7], [8]. However, these schemes are heuristics and do not provide any guarantees on their convergence or delay-performance. Besides this, a number of state-of-the-art packet schedulers exist for queuing networks that can be used for scheduling in M2M uplink. Fair queuing [9], [10] provides perfect fairness among different traffic classes but almost all its implementations suffer from high operational complexity and also do not account for diverse delay requirements of traffic. To get around these issues, weighted round robin (WRR) and weighted fair scheduling [11] have been proposed that sacrifice certain degree of fairness to incorporate the traffic heterogeneity in their design of weights. However the determination of the delay-optimal weights is not easy and are assigned based on certain criteria chosen by the site administrator. Tassiulas et. al. [12] proposed the throughputoptimal max-weight scheduling algorithm, but it results in highly unfair resource allocation when the traffic arrival rates are skewed.
In this paper, we propose a online delay-optimal packet scheduler for M2M uplink. We classify the M2M traffic aggregated at M2M application server (AS) into two broad classes consisting of delay-sensitive and delay-tolerant traffic, with potentially different payload size and packet arrival rates. We then employ sigmoidal functions to map the traffic delay requirements onto utility functions (of packet delay) for each class. The sigmoidal function is versatile enough to represent any arbitrary delay requirements, by appropriately modifying its parameters. Our goal is to determine the optimal scheduling policy that maximizes a proportionally fair system utility metric. We note that, for any given scheduler, the average delay of a class can be expressed as a convex combination of its maximum delay (when served with least preemptive priority) and minimum delay (when served with highest preemptive priority 1 ). Thus the average delay of classes for any work-conserving 2 scheduler can be realized by appropriately time sharing between different priority policies. Hence, the proposed optimal scheduler is determined by solving for the optimal fraction of time-sharing between the two priority policies that maximizes the system utility. Using Monte-Carlo simulations, we verify the correctness of the proposed scheduler and show that it performs better than various stateof-the-art schedulers such as WRR, max-weight scheduler, fair scheduler and priority scheduling. We also note that at higher traffic arrival rate, the proposed scheduler results in a much smaller delay variance for the delay-sensitive traffic as compared to the other schedulers. Lastly the proposed scheduler is agnostic to communication standard used for M2M uplink and easily adapt to time-varying characteristics of M2M traffic.
The rest of the paper is organized as follows. Section II introduces the system model for M2M uplink. Then in Section III, we map the traffic delay requirements onto the utility functions, formulate the utility maximization problem and then present the optimal scheduler. Section V presents simulation results. Finally, Section VI draws some conclusions. The sensory data from each local group of sensors is first aggregated at a M2M Aggregator (MA) and then the data from multiple MA's is aggregated and queued at a M2M Application Server (AS). The data from each MA is transmitted to the AS using parallel orthogonal channels 3 . Since the M2M traffic from multiple sensors is aggregated at each MA, assigning dedicated resources to each MA-AS link does not result in any significant resource wastage.

II. SYSTEM MODEL
We assume that the data from the sensors can be broadly classified into two classes at A: class 1 for delay-sensitive and class 2 for delay-tolerant traffic. We assume that the arrival process for class i is Poisson with rate λ i [13]. Consider a general packet size distribution for class i with average packet size of s i . Let r denotes the AS service rate and X i be the resultant general service time distribution for class i with service rate µ i = r/s i . The total time spent by a packet in the system, T , can be written as sum of following components, which denote the following component delays: 1 Hereafter, we drop the qualifier 'preemptive' for succinctness. 2 A work-conserving scheduler is the one that does not go idle when there are jobs waiting to be served. 3 Using Orthogonal Frequency Division Multiple Access, the data from each MA-AS link is assigned a set of orthogonal sub-carriers. The number of subcarriers assigned to each MA-AS link depends on its data-rate requirements. The small packet size of M2M data relative to transmission rate allows us to ignore T trans . Also, the propagation time T prop is quite small relative to other delay components and thus can be safely ignored. The congestion delay T cong for the sensor-MA link can be ignored due to small number of sensors under each MA, each with low traffic rate. The congestion delay for MA-AS links is ignored due to the assumption of dedicated channel for each link. Therefore in this work, we ignore all the terms except the queuing delay, T queue and the service time T ser at AS. Now the queuing delay for each class at AS depends upon the scheduling policy adopted at the AS. The scheduling policy at AS should be chosen as to maximally satisfy the latency constraints of packets of both classes.

III. PROBLEM FORMULATION
In this section, using sigmoidal function [14], [15], we first map the delay requirements for class i onto its utility function as, 1+e a i b i and l i is the latency 4 of a class i packet. Note that U (0) = 1 and U (∞) = 0. The parameter a i is the utility roll-off factor for class i and the inflection point for the utility occurs at The sigmoidal function is versatile to represent diverse delay requirements by appropriately changing its parameters.   For high a and low b, the utility function becomes 'brickwalled' (see Fig. 2) and is a good fit for delay-sensitive traffic of class 1. On the other hand, at low value of a and high b, the sigmoidal utility function is a good fit for delay-tolerant traffic of class 2 as shown in Fig. 3.

A. System utility function
For a given scheduling policy P, we first define a proportionally fair system utility function as, where U i (P) = U i (l i ) is the utility for class i in steady state. l i is the average latency of class i in steady state and can be expressed as,l where M i (T s ) is the number of packets of class i served in time T s and l j i is the latency of the j th packet of class i. The parameters β 1 and β 2 denote the relative importance of utilities of two classes, with a higher value indicating higher importance of that class towards the overall system utility.

B. Optimization Problem
Assume that in a sufficiently large time interval 5 , the AS serves the class 1 and class 2 packets with (preemptive) priority for α 1 and α 2 fraction of the time respectively. Then the average latency of two classes can be expressed as, wherel ij denotes the average latency of class i when class j is served with higher priority. We then use the existing results for average latency of a class in M/G/1 priority queuing systems by Bertsekas et. al. [16] to get, where ρ i = λ i /µ i is the AS utilization ratio for class i and R ij (i, j ∈ {1, 2}) denotes the the average residual time of class i packet when class j has higher priority as given by, whereX 2 i denotes the second moment of distribution X i . Since this scheduling policy is completely characterized bȳ α = [α 1 α 2 ], the system utility in Eq. (3) becomes, Exploiting the strictly increasing nature of logarithms, we formulate the following utility-maximization problem to determine the optimal α 1 and α 2 , max α log (V (ᾱ)) = β 1 log (U 1 (ᾱ)) + β 2 log (U 2 (ᾱ)) s.t. α 1 , α 2 ≥ 0, Theorem 1. The optimization problem in Eq.(9) is convex.
Proof: We first prove that f i (ᾱ) = log (U i (ᾱ)) is concave ∀ i. The Hessian matrix of f i atᾱ is defined as, where f i jk = ∂ 2 f i ∂αj ∂α k . On solving, we get the following result, where θ i = e −ai(li−bi) .
Therefore, H i (ᾱ) is given by, Now to prove that f i is a concave function, it is sufficient to prove that H i is a Negative Semi-Definite (NSD) matrix for allᾱ that satisfies the constraints in (9). Let ∆ k denote a k th order principal minor of H i . Then H i is NSD if and only if (−1) k ∆ k ≥ 0 for all principal minors of order k = 1, 2.

IV. OPTIMAL SCHEDULER
Having established the convexity of the optimization problem, we now proceed to solve it to determine the optimal solution. To make the analysis simple, we reduce the number of variables by setting α 1 = α and α 2 = 1 − α in Eq. (9). Then the only constraint is that 0 ≤ α ≤ 1. We solve the unconstrained optimization problem and then factor in the constraint on α by providing a boundary condition. At the optimal solution α * , we have, Using Eq. (2), we have, Now using Eq. (2) and Eq. (14) in Eq. (13), we get, Noting that (1 + c 1 d 1 ) = c 1 and (1 + c 2 d 2 ) = c 2 , and rearranging the terms we get, We note that the LHS is a constant and denote it by θ. Using algebraic manipulations, we get, where we have, Now imposing the constraint 0 ≤ α * ≤ 1, we have, This is due to the concave nature of the objective log(V (α)) as shown in Fig. 4. If α * / ∈ [0, 1], then the maxima lies at the extreme points of the feasible region i.e., we set α * = 0 or 1.

V. SIMULATION RESULTS
In this section, we use Monte-Carlo simulations to first evaluate the accuracy of the analytical result for proposed scheduler given in Eq. (17) and then compare the system utility and delay jitter performance of the proposed scheduler against other packet schedulers such as WRR, max-weight scheduler, fair scheduler and priority scheduling. The arrival rate for class 1 is set to λ 1 = 0.4 s −1 . For simplicity, we assume constant packet size for each class and thusX 2 i in Value of α Determine α * by numerically solving Eq. (17). end if Eq. 7 is simply 1/µ 2 i . We set to s 1 = s 2 = 100 B and the service rate is r = 100 B/s. The utility function parameters for class 1 are set to a 1 = 1 s −1 , b 1 = 5 s and β 1 = 1. For class 2, the utility parameters are a 2 = 0.3 s −1 , b 2 = 10 s and β 2 = 0.3. The determination of delay-optimal weights for WRR is non-trivial. However, a sub-optimal yet delayefficient weight assignment for class i is to set its weight, w i , inversely proportional to its delay requirement (set as (b i + 4 ai for simplicity) and its packet size s i . After normalizing to integer values, we get the weights as [w 1 , w 2 ] = [111, 43]. As expected, the system utility monotonically decreases with increase in λ 2 due to larger queuing delay at AS. We verify the correctness of the analytical result in Eq. (17) as both the theoretical and simulation result match.

A. System utility performance of different schedulers
The proposed scheduler outperforms other schedulers with the performance gap being much larger at higher λ 2 . This is because unlike other schedulers, it prioritizes service to delaysensitive traffic at higher arrival rates of delay-tolerant traffic. Therefore, at very low λ 2 , the proposed optimal scheduler converges to priority to class 2, while at high λ 2 priority to class 1 becomes optimal due to its delay-sensitive traffic.
The queue size of both classes become comparable at high λ 2 , and thus max-weight scheduling selects the packets from each class with roughly same frequency. Due to the increased server utilization by delay-tolerant traffic, the utility of delaysensitive traffic and eventually the system utility is reduced. Similarly the performance of fair scheduler and WRR degrades at high λ 2 due to increased AS utilization by class 2. The performance of WRR is bad despite assigning higher weight to delay-sensitive traffic due to the usage of non-optimal weights. Even with optimal weights, we still expect its performance to be sub-optimal as it aims to achieve (weighted) fairness of service between the delay-tolerant and delay-sensitive traffic. This is in direct conflict with service requirement of delaysensitive traffic which needs to be prioritized over delaytolerant traffic, particularly so at high arrival rate of delaytolerant traffic.

B. Delay jitter performance of various schedulers
We now study the jitter performance by measuring the packet delay variance for each class under a given scheduling policy. Fig. 6 and 7 show the plot of jitter of delay-sensitive class 1 and delay-tolerant 2 respectively as volume of delaytolerant traffic (λ 2 ) is increased. We note that at high λ 2 , the jitter for the delay-sensitive traffic is the least and same as that of priority-class 1 scheduler. This is highly desirable for delay-sensitive applications. Furthermore, the jitter for delaysensitive traffic is roughly constant as volume of delay-tolerant traffic is increased. Thus it is resilient to increase in delaytolerant traffic. Although, the jitter of delay-tolerant traffic is quite high, it is usually acceptable due to its delay-tolerant nature and if needed, it can be mitigated using a jitter regulator.
The transitions in the jitter for proposed scheduler in Fig. 6 and 7 occur when it switches from one priority scheme to another (i.e., from α = 0 to α = 1). In fact by making the  x-axis (λ 2 ) finer, we can allow the scheduler to take on all values of α between 0 and 1 as λ 2 is increased from 0.15 and 0.2.

VI. CONCLUSIONS AND FUTURE WORK
In this paper, we presented a delay-optimal online packet scheduler for M2M uplink traffic. To this end, we first used a generic sigmoidal function to map the diverse latency requirements of delay-sensitive and delay-tolerant M2M traffic onto appropriate utility functions. We defined a system utility metric as the weighted product of average utility of two classes so as to ensure proportional fairness among them. The delay-optimal scheduler is obtained as a solution to the system utility maximization problem. We note that any workconserving scheduling policy can be realized by appropriating time-sharing between the preemptive priority scheduling policies. Therefore, we obtain the optimal scheduling policy by solving for the optimal fraction of time-sharing between the two preemptive priority policies that results in maximum system utility. Using Monte-Carlo simulations for the queuing process at AS, we verify the correctness of the analytical result for optimal scheduler and compared its performance with various state-of-the-art schedulers. We show that the proposed scheduler outperforms other schedulers with the performance gap quite large at high arrival rate of delaytolerant traffic. The proposed scheduler converges to either of priority scheduling policies as the arrival rate of delay tolerant traffic is varied. Lastly, we note that the delay jitter of delay-sensitive traffic at medium to high server utilization, is significantly lower than that of other scheduling policies, which is a highly desirable feature for delay-sensitive traffic. This comes at the expense of somewhat higher delay variance for delay-tolerant traffic which is usually acceptable due to its delay-tolerant nature.