Anne-Sophie Bargnoux

Marion Morena

Annie Rodriguez

Caroline Courtais-Coulon

Anne-Marie Dupuy

Nils Kuster

Lotfi Chalabi

Jean-Paul Cristol
email: jp-cristol@chu-montpellier.fr

Caroline Courtais- Coulon

Monitoring of ionized magnesium in hemodialysis patients: A useful tool to allow a personalized prescription of dialysate composition

Keywords:

à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Monitoring of ionized magnesium in hemodialysis

patients: A useful tool to allow a personalized prescription of dialysate composition

Introduction

Mg is a divalent cation mainly stored in bone (60%), muscle and red blood cells (30 to 40%). Plasma Mg only accounts for 1% of the Mg pool with a concentration ranging from 0,75 to 0,95 mmol/L in healthy subjects with normal renal function. This level results from an appropriate balance between intestinal Mg absorption and renal excretion. In the serum/plasma Mg is found in 3 different forms: protein-bound (20%), a complexed form (15 %) and an ionized (iMg) form (65 to 75%) [START_REF] Dent | Measuring magnesium -Physiological, clinical and analytical perspectives[END_REF][START_REF] Workinger | Challenges in the Diagnosis of Magnesium Status[END_REF][START_REF] Saris | Magnesium. An update on physiological, clinical and analytical aspects[END_REF]. The kidney function plays a key role in Mg balance since tubular reabsorption accounts for 95% of the filtered form. The renal handling of Mg is a highly adaptive mechanism that mainly depends on the plasma concentration, but which is exceeded when glomerular filtration rate is <30 mL/min/m2 [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF].

In chronic kidney disease (CKD), the concentration of magnesium (Mg) is the result of dietary intake, Mg supplementation, medications (proton pump inhibitor use, anti-acids, phosphate binders), residual renal function or per-dialytic losses [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF][START_REF] Apetrii | Magnesium supplementation: A consideration in dialysis patients[END_REF]. Hypomagnesemia has been associated with per-dialytic complications (myocardial contractility disorders, arrhythmias, hemodynamic instability) or chronic complications (hypertension, vascular calcifications, muscle weakness, tetany) [START_REF] Van De Wal-Visscher | Magnesium in Chronic Kidney Disease: Should We Care?[END_REF][START_REF] Navarro-Gonz´alez | Clinical implications of disordered magnesium homeostasis in chronic renal failure and dialysis[END_REF][START_REF] Leenders | The association between circulating magnesium and clinically relevant outcomes in patients with chronic kidney disease: A systematic review and metaanalysis[END_REF]. A recent meta-analysis of 13 observational studies [START_REF] Wu | Prognostic Value of Serum Magnesium in Mortality Risk among Patients on Hemodialysis: A Meta-Analysis of Observational Studies[END_REF] in hemodialysis (HD) patients evidenced that low serum Mg was associated (hazard ratios (HRs) and 95% confidence intervals (CIs)) with higher all-cause (HR 1.58 [95% CI: 1.31-1.91]) and cardiovascular (HR 3.08 [95% CI: 1.27-7.50]) mortality. Manifestations of moderate and severe hypermagnesemia are related to neuromuscular toxicity causing cardiac conduction defects, hypotension and paralysis [START_REF] Van De Wal-Visscher | Magnesium in Chronic Kidney Disease: Should We Care?[END_REF][START_REF] Navarro-Gonz´alez | Clinical implications of disordered magnesium homeostasis in chronic renal failure and dialysis[END_REF]. In addition, as a potent activator of calcium-sensing receptor, Mg may have an important regulatory role in PTH secretion. Hypermagnesemia suppresses PTH secretion especially at low-normal serum calcium levels, whereas this effect may become weaker at high and low serum calcium levels [START_REF] Sakaguchi | Magnesium and Risk of Hip Fracture among Patients Undergoing Hemodialysis[END_REF].

However, severe hypomagnesemia can also paradoxically suppress PTH production at any given calcium level [START_REF] Vetter | Magnesium and the parathyroid[END_REF] leading to relevant hypocalcemia.

At the CKD 5 dialysis stage, dialysate Mg concentration is a major determinant of Mg balance [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF][START_REF] Apetrii | Magnesium supplementation: A consideration in dialysis patients[END_REF][START_REF] Van De Wal-Visscher | Magnesium in Chronic Kidney Disease: Should We Care?[END_REF][START_REF] Navarro-Gonz´alez | Clinical implications of disordered magnesium homeostasis in chronic renal failure and dialysis[END_REF]. Therefore, dialysate Mg prescription represents one of the treatment strategies to regulate Mg homeostasis in dialysis patients. Previous studies, assessing the dialysate Mg and the dialytic balance in HD patients [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF], mostly addressed acetate fluids with 0.25, 0.5 or 0.75 mM Mg. More recently, Safranek et al [START_REF] ˇsafr´anek | Changes of serum calcium, magnesium and parathyroid hormone induced by hemodialysis with citrate-enriched dialysis solution[END_REF] showed a relationship between citrate exposure and kinetic behavior of serum Mg concentrations between a traditional dialysis solution containing acetate and a citrate enriched dialysis solution with a fixed concentration of magnesium (0.5 mM). In addition, dialysis modalities have changed over time using highflux membranes, hemodiafiltration using high convection volume, citrate dialysate as well as the use of proton pump inhibitors, oral supplementation and diet. Assessing Mg status is challenging. Total plasma Mg is routinely measured in the central laboratory to assess magnesium status. As almost 99% of the total body Mg is intracellular with a great part located in red blood cells, the intraerythrocyte Mg concentrations [START_REF] Kusic | Total serum and intraerythrocyte magnesium concentrations in hemodialysis patients using different dialysate solutions[END_REF] may provide a more accurate assessment of the pool. But it is not readily available. The ionized form of Mg, which represents the biologically active form of Mg within the body, is measurable by ion selective electrode on a blood gas analyzer [START_REF] Jawa | A Comparative Assessment of the Nova Stat Profile Prime Plus® Critical Care Analyzer[END_REF]. In addition, iMg is the only form that can be ultrafiltered. In dialysis patients, significant discrepancies of the proportion of ionized to total magnesium have been reported because of acid-base status, binding to undialyzed anionic compounds, bone mineral disease and hypoalbuminemia [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF]. To the best of our knowledge, no study previously compared the four conditions, citrate vs acetate fluids and 0.5 vs 0.75 mmol/L Mg in the same chronic dialysis population using both tMg and iMg determination.

It appears that the effect of a dialysis session with Mg-enriched citrate dialysis solution on both iMg and tMg fractions have not been evaluated specially in high-performance dialysis.

The aim of the present study is therefore twofold. Firstly, we evaluated Mg status in chronic dialysis patients according to tMg and iMg reference range as well as the impact of acid-base status, anionic compounds, and albumin/ protein on iMg concentration. Secondly, we assessed the systemic variations of iMg in parallel to those of iCa before and after a single dialysis session using acetate or citrate fluids and 0.5 or 0.75 mmol/L of Mg. The study protocol complied with the Declaration of Helsinki and was registered at clinicaltrials.gov (NCT05337436). The Institutional Review Board of Montpellier University Hospital approved the study protocol (IRB-MTP_2022_01_202100918) and waived the need for signed consent for participants.

Materials and methods

Study design and settings

Data collection

Medical records were reviewed for demographic and clinical data. Pre-and post-dialysis heparin blood samples were drawn, tested for iMg and iCa on whole blood and then centrifuged (2000 g for 10 min) for routine parameter measurements on a Cobas 8000 instrument using e802, c702 and c502 modules (Roche Diagnostics, Meylan, France). Total Mg (tMg) and Ca (tCa) were analyzed by colorimetric methods, NM-BAPTA [START_REF] Bourguignon | Evaluation of NM-BAPTA method for plasma total calcium measurement on Cobas 8000®[END_REF] and xylidyl blue complex assays, respectively. The CVs, calculated from Roche internal quality control over a 12 month-period were 1.5% for tMg (means 0.81 and 1.34 mmol/L) and 1.4% for tCa (means 2.24 and 3.34 mmol/L). The anion gap was calculated as follows: anion gap = (sodium mEq/L + potassium mEq/L) -(bicarbonate mEq/L + chloride mEq/L). Based on previously published data [START_REF] Dent | Measuring magnesium -Physiological, clinical and analytical perspectives[END_REF][START_REF] Rustad | The Nordic Reference Interval Project 2000: recommended reference intervals for 25 common biochemical properties[END_REF] and manufacturer's recommendations, a range of 0.70-1.00 mmol/L and 2.20-2.52 mmol/L for tMg and tCa respectively was used as the reference interval.

pH, ionized Mg and Ca were measured using direct ion-selective electrode on Nova Stat Profile Prime Plus® (Nova Biomedical, Waltham, MA, USA) blood gaz analyzer [START_REF] Jawa | A Comparative Assessment of the Nova Stat Profile Prime Plus® Critical Care Analyzer[END_REF]. Prior to the study, imprecision was assessed using the Clinical and Laboratory Standard Institute (CLSI) EP15-A3 protocol (one run per day, five replicates per run for five days, n = 25 replicates per sample) [START_REF] Carey | User Verification of Precision and Estimation of Bias; Approved Guideline-Third Edition[END_REF] by repeat analysis of 2 levels of Nova aqueous quality control samples (STAT Profile Prime Plus Ampuled chemistry levels 4,5). The within-laboratory coefficients of variation (CV) were 2% for iMg (means 0.57 and 1.09 mmol/L) and 1% for iCa (means 1.09 and 1.56 mmol/L). The iMg and iCa manufacturer's reference ranges were 0.45-0.60 mmol/L and 1.09-1.3 mmol/L, respectively [START_REF] Bouillon-Minois | Ionized Magnesium: Interpretation and Interest in Atrial Fibrillation[END_REF]. The intra-individual variabilities of serum/plasma tMg and whole blood iMg were 2.9% [START_REF] Aarsand | The EFLM Biological Variation Database[END_REF] and 2.0% [START_REF] Newhouse | Variability within individuals of plasma ionic magnesium concentrations[END_REF] respectively. 2.3. Statistical analysis Data were expressed as median [interquartile range] for continuous variables and proportions for categorical variables. The agreement between Mg classifications as low, normal or high using tMg and iMg was assessed through 290 predialysis pairs (tMg, iMg) from 134 dialysis patients using the percent agreement and the weighted Cohen's κ-test coefficient with values ≤ 0.2 as indicating no agreement and 0.21-0.39 as minimal, 0.40-0.59 as weak, 0.60-0.79 as moderate, 0.80-0.90 as strong and above 0.90 as almost perfect agreement [START_REF] Mchugh | Interrater reliability: the kappa statistic[END_REF]. The same analysis was performed for Ca classifications using tCa et iCa. The impact of pH, anion gap protein and albumin among discordant Mg or Ca classifications was evaluated by Student's t-test. The comparisons of variables between pre-dialysis and post-dialysis were performed using the by paired Student's t-test. The comparisons of variables between the four groups of patients, based on dialysis fluid composition, were performed using the Kruskal-Wallis test. When comparisons were statistically significant, two-by-two comparisons were carried out using the post hoc Dunn's pairwise tests with Bonferroni correction. Statistical analysis was carried out with the XLSTAT® software for Windows, version 2016.06.35661 (NY, USA) and the statistical significance was set at p < 0.05.

Results

Characteristics of the population

The group consisted of 52 women and 82 men with a median age of 70.9 (IQR, 63.2-78.5) years. Mean kt/v was 1.55 ± 0.32. Characteristics of each dialysis session are described in Table 1 for dialysate composition, hemodialysis status, dialysis efficiency and in Table 2 for biological variables.

Agreement between Mg classifications using tMg and iMg reference ranges

The percent agreement between the reference interval using tMg and iMg was 56.9 [IC95%, 51.0-62.6]. The weighted kappa coefficient was 0.31 [IC95%, 0.24-0.39] indicating a minimal agreement to assess Mg status. Based on the discordance observed between ionized and total plasma Mg, two groups of patients were identified: the "false normal" group (36.2%) characterized by high ionized and normal total forms and the "false low" group (6.9%) characterized by normal ionized and low total forms (Fig. 1A). A significantly lower anion gap (p = 0.004) was found in patients with high iMg and normal tMg compared to the control group with both normal tMg and iMg (Table 3). The pH was not different between both groups. The group with normal iMg and low tMg demonstrated a significantly lower albumin level compared to the control group.

By comparison, the percent agreement between the reference interval using tCa and iCa was 75.9 [IC95%, 70.5-80.6] and the weighted kappa coefficient was 0.54 [IC95%, 0.46-0.63] indicating a weak agreement. Based on the discordance observed between ionized and total plasma Ca, most of the patients were classified in the "false low" group (20.7%) characterized by normal ionized and low total forms

Dialytic balance of magnesium during the session

All dialysis sessions led to significant changes in the divalent total or ionized cations (p < 0.001) (Table 4) except for iMg when citrate dialysate with 0.75 mmol/L of Mg was used (p = 0.07). All dialysate compositions showed a significant tCa and iCa load during the session. Acetate and citrate dialysates with 0.5 mmol/L of Mg led to a significant Mg loss, including both total (-0.12 and 0.13 mmol/L, respectively) and ionized (-0.08 and 0.14 mmol/L, respectively) Mg (Table 5). By contrast, the use of acetate and citrate dialysates with 0.75 mmol/L of Mg led to a positive balance with a significant median intra-dialytic augmentation of 0.15 and 0.08 mmol/L for tMg, respectively. This increase in tMg was associated with a significant augmentation in iMg concentration with acetate dialysate (0.11 mmol/L) whereas iMg remained unchanged when using citrate fluid. The Mg changes during the session depends on pre-dialysis levels. The "cut-off" values corresponding to a neutral balance were determined (Fig. 2). When pre-dialysis level was below this concentration, an uptake was observed during the session. The "cut-off" value with a citrate-enriched dialysis solution was lower than that of a traditional dialysis solution containing acetate for a fixed concentration of magnesium (0.5 or 0.75 mmol/L). Based on tMg, dialysate fluids with 0.5 Mg led to an uptake in 11.1% and 11.5% of patients for acetate and citrate, respectively. Using Mgenriched dialysis solution, a positive balance was observed for 93.8% and 72.0% of the patients for acetate and citrate, respectively. Based on iMg, dialysate fluids with 0.5 Mg led to an uptake in 5.6% and 2.6% of patients for acetate and citrate, respectively. Using Mg-enriched dialysis solution, a positive balance was observed for 95.4% and 56.0% of the patients for acetate and citrate, respectively (Supplementary Figs. 1 and2).

Significant differences in divalent cation changes among the four dialysate fluids were observed for tMg, iMg and iCa but not for tCa (Table 5). Significant differences in pairwise comparisons were found for iMg and tMg (p < 0.0083 after Bonferroni correction) between dialysates highlighting the negative balance of Mg using dialysate concentration with 0.5mmol/L of Mg. Interestingly, the tMg and iMg negative balances were similar between the two acids at 0.5 mM. (Fig. 3A). Regarding iCa, significant differences in pairwise comparisons were found between acetate-and citrate-based dialysates highlighting a higher iCa load with acetate use (Fig. 3B).

Discussion

Our results support the known discordant interpretation between ionized and total values to assess magnesium status in dialysis patients but with a general shift toward higher values when using iMg. In addition, our findings confirmed a Mg loss (both ionized and total forms) using dialysate concentration with 0.5 mmol/L of Mg. We found that enrichment of acetate fluid with 0.75 mM of Mg resulted in a significant iMg load depending on predialysis levels while citrate fluid with 0.75 mM resulted in a neutral balance for iMg. These two findings suggest a personalization of dialysis fluid according to iMg.

Discordance between pre-dialysis total and ionized values of divalent cations

It has been clearly established that tCa concentration depends on protein-bound calcium (approximatively 45%), which is sensitive to blood pH, albumin (the major factor), and total protein levels [START_REF] Pekar | Calcium state estimation by total calcium: the evidence to end the never-ending story[END_REF].

Accordingly, the majority of the observed calcium discrepancies in our study was a subgroup of patients with normal iCa and low tCa for which both significantly lower protein and albumin levels were found. However, data for Mg are less conclusive. In the present work, the use of iMg, the biologically active form, tended to reclassify dialysis patients in the normal (74%) and in the increased (49%) Mg categories by comparison with the tMg.

Several studies have examined the ionized fraction of tMg in dialysis patients compared to healthy controls [START_REF] Cunningham | Magnesium in chronic kidney disease Stages 3 and 4 and in dialysis patients[END_REF]. Some studies found a similar fraction [START_REF] Saha | Measurement of serum ionized versus total levels of magnesium and calcium in hemodialysis patients[END_REF][START_REF] Dewitte | The ionized fraction of serum total magnesium in hemodialysis patients: is it really lower than in healthy subjects?[END_REF] whereas others did not [START_REF] Markell | Deficiency of serum ionized magnesium in patients receiving hemodialysis or peritoneal dialysis[END_REF][START_REF] Truttman | Maintenance hemodialysis and circulating ionized magnesium[END_REF]. It has been suggested that hypoalbuminemia and metabolic acidosis could lead to a higher iMg fraction while a reduced ionized fraction could be due to the presence of anionic compounds that complex Mg. In line with this, the anion gap was recently evaluated as a determinant of the ionized fraction of divalent cations in hemodialysis patients [START_REF] Sakaguchi | Anion Gap as a Determinant of Ionized Fraction of Divalent Cations in Hemodialysis Patients[END_REF]. Unlike calcium, few patients in our study had normal iMg associated with low tMg and only low albumin levels had an impact on tMg concentrations. Such results were not found in a recent study of 236 patients with de novo atrial fibrillation including patients from the emergency department (n = 131) and intensive care units (n = 105) [START_REF] Bouillon-Minois | Ionized Magnesium: Interpretation and Interest in Atrial Fibrillation[END_REF]. In our study, dialysis patients with normal tMg and high iMg represent the majority of discordant results. Due to the change in divalent cations binding to plasma proteins, ionized concentrations decrease as the pH increases. However, this effect is not as pronounced for iMg concentration (0.12 mmol/L per pH unit) compared to that of iCa (0.36 mmol/L per pH unit) [START_REF] Wang | pH effects on measurements of ionized calcium and ionized magnesium in blood[END_REF]. In line with these experimental data and in accordance with the results obtained in patients with de novo atrial fibrillation [START_REF] Bouillon-Minois | Ionized Magnesium: Interpretation and Interest in Atrial Fibrillation[END_REF], we did not observe an impact of pH on the ionized fraction of Mg in patients with normal tMg values. Consistent with previous findings [START_REF] Sakaguchi | Anion Gap as a Determinant of Ionized Fraction of Divalent Cations in Hemodialysis Patients[END_REF], the anion gap, here, was significantly lower in patients with high iMg values and normal tMg.

Lack of assay harmonization and between-run calibration have been put forward to explain the apparent discrepancy observed in patient classification in the literature [START_REF] Dewitte | The ionized fraction of serum total magnesium in hemodialysis patients: is it really lower than in healthy subjects?[END_REF]. Standardization of the automated tMg measurements using dye binding or enzymatic assays seems to be effective regarding traceability of the calibration to both higher order reference materials and reference measurement procedures [START_REF] Dent | Measuring magnesium -Physiological, clinical and analytical perspectives[END_REF]. By contrast, the determination of iMg needs a specific ion selective electrode which can suffer from a lack of assay standardization as seen for iCa [START_REF] Larcher | Discrepant post-filter ionized calcium concentrations by 2 common gas analyzers in continuous renal replacement therapy using regional citrate anticoagulation: another piece of the puzzle[END_REF]. An earlier evaluation of three available analyzers from three different manufacturers (AVL Medical Instruments AG, KONE Instruments and Nova Biomedical) showed significant differences regarding iMg concentration which therefore limits result comparison in clinical practice. The authors recommended improving the specificity of electrodes as well as standardization of calibrators and control materials [START_REF] Huijgen | Serum ionized magnesium: comparison of results obtained with three ion-selective analyzers[END_REF]. It should be noted that the only commercially available analyzer at present is from Nova Biomedical. Some authors addressed the need to redefine reference ranges to assess Mg status [START_REF] Dent | Measuring magnesium -Physiological, clinical and analytical perspectives[END_REF][START_REF] Workinger | Challenges in the Diagnosis of Magnesium Status[END_REF][START_REF] Bouillon-Minois | Ionized Magnesium: Interpretation and Interest in Atrial Fibrillation[END_REF] using tMg or iMg in view of the clinical manifestations. The lack of standardization of diagnostic reference intervals of iMg and the ongoing uncertainty on the reference intervals could hamper the interpretation of the data. The distribution observed in our study differs from that previously described in 118 hemodialysis patients [START_REF] Sakaguchi | Anion Gap as a Determinant of Ionized Fraction of Divalent Cations in Hemodialysis Patients[END_REF] where the authors identified a discordant subgroup of patients (56%) with high tMg and normal iMg but is comparable to that previously observed in intensive care unit settings [START_REF] Yeh | Total and ionized magnesium testing in thesurgical intensive care unit -Opportunities for improved laboratory and pharmacy utilization[END_REF][START_REF] Huijgen | Magnesium levels in critically ill patients. What should we measure?[END_REF]. Both comparators used the same analyzer to measure iMg and the same reference interval to interpret agreement between classification. In 2023, Ansu Baidoo et al. [START_REF] Baidoo | Systematic Review and Meta-Analysis to Estimate a Reference Range for Circulating Ionized Magnesium Concentrations in Adult Populations[END_REF] published a systematic review and metaanalysis to estimate a reference range for iMg. The estimated reference ranges for healthy adults were 0.40-0.68 mmol/L for iMg and 0.72-1.0 mmol/L for tMg based on a total of 53 studies. The agreement increased to 79.3% between tMg and iMg using these two reference intervals in our study. Based on the observed discordances, the "false normal" group (6.9% vs 36.2%) characterized by high ionized and normal total forms was present in a smaller proportion and the "false low" group (9.3% vs 6.9%) characterized by normal ionized and low total forms was present in the same proportion. A third group emerged, the "false high" group (4.5%) characterized by normal ionized and high total forms.

Dialytic balance of calcium and magnesium during the session

The 2017 KDIGO guidelines related to CKD-Mineral and Bone Disorder suggest the use of a dialysate calcium concentration between 1.25 and 1.50 mmol/L [START_REF]Kidney Disease: Improving Global Outcomes (KDIGO) CKD-MBD Update Work Group., KDIGO 2017 Clinical Practice Guideline Update for the Diagnosis, Evaluation, Prevention, and Treatment of Chronic Kidney Disease-Mineral and Bone Disorder (CKD-MBD)[END_REF]. Dialytic calcium balance is partly dependent on iCa diffusion gradient between blood and dialysate compartments with a neutral balance using a dialysate concentration of 1.25 mmol/l and a calcium load using a dialysate concentration of 1.5 mmol/l [START_REF] Bosticardo | Optimizing the dialysate calcium concentration in bicarbonate haemodialysis[END_REF]. In our study, the calcium balance (delta between pre-and post-dialysis values) was slightly positive with all 4 dialysates with no difference between groups using tCa. These results confirm previous findings which suggest that a higher calcium content has to be used with citrate dialysis compared with standard dialysis [START_REF] ˇsafr´anek | Changes of serum calcium, magnesium and parathyroid hormone induced by hemodialysis with citrate-enriched dialysis solution[END_REF][START_REF] Schmitz | Effects of citrate dialysate in chronic dialysis: a multicentre randomized crossover study[END_REF]. Indeed, the complexes formed between citrate and divalent cations influence the ionized fraction available for diffusion in the dialysis fluid. It has been reported that supplementation of the citrate dialysate with 0.25 mmol/L of calcium corrected the difference in post-dialysis calcium concentration between acetate and citrate modalities [START_REF] Gabutti | Citrate-vs. acetate-based dialysate in bicarbonate haemodialysis: consequences on haemodynamics, coagulation, acidbase status, and electrolytes[END_REF]. In our study, using an increased Ca concentration of 0.15 mmol/L in the citrate dialysate resulted in a similar balance of tCa. However, the iCa load appeared significantly lower with citrate fluid (about 0.05 mmol/L) than with acetate fluid (about 0.12 mmol/L). Differences could be explained by the ion selective electrode sensitivity to the different calcium forms. Indeed, it has been shown that citrate plasma levels during citrate HD reach a maximum at 2 h to become then stable, while they progressively increase during citrate HDF with values at 4 h significantly higher than in citrate HD [START_REF] Panichi | Post-dilution on line haemodiafiltration with citrate dialysate: first clinical experience in chronic dialysis patients[END_REF]. As a result, at the end of the dialysis session, the 3 forms of Ca are measured, particularly the Ca-citrate complex, using colorimetric method but not with the ion selective electrode.

However, less attention has been paid to Mg. Cunningham et al. in 2012 [4] reviewed studies on serum/ionized Mg with different Mg dialysate concentrations and reported three studies evaluating the influence of HD treatment on total and ionized Mg fractions. The two dialysate concentrations (0.5 and 0.75 mmol/L) led to a decrease of both tMg and iMg, whereas in our study, a significant positive balance of 20% for both tMg and iMg with acetate dialysate Mg concentration at 0.75 mmol/L was found. Mean pre-dialysis tMg (ranging from 0.97 to 1.19 mmol/L) and iMg (ranging from 0.62 to 0.71 mmol/L) concentrations in these studies were higher than in ours where median tMg and iMg ranged from 0.85 to 0.90 and 0.65 to 0.60 mmol/L, respectively. This could partly explain the observed discrepancy since the predialysis level influences Mg diffusion during the session. The modification of dialysis solution with substitution of part of acetate by citrate influences changes of iMg during dialysis [START_REF] ˇsafr´anek | Changes of serum calcium, magnesium and parathyroid hormone induced by hemodialysis with citrate-enriched dialysis solution[END_REF][START_REF] Schmitz | Effects of citrate dialysate in chronic dialysis: a multicentre randomized crossover study[END_REF]. We confirmed the results obtained by Safranek et al [START_REF] ˇsafr´anek | Changes of serum calcium, magnesium and parathyroid hormone induced by hemodialysis with citrate-enriched dialysis solution[END_REF] using acetate and citrate dialysis solutions with a fixed concentration of Mg at 0.5 mmol/L and found predialysis "cut-off" concentrations lower with citrate than with acetate dialysis solution of 0.68 (vs 0.75) and 0.43 (vs 0.51) mmol/L for tMg and iMg respectively (Fig. 2). We extend previous results in this domain by showing that increased Mg concentration in the citrate dialysate led to a significant slightly positive balance of 10% for tMg and a neutral balance of 4% for iMg. This latter discrepancy between the two forms of Mg could be explained, once again, by the diffusion of citrate in the blood at the end of the dialysis session [START_REF] Panichi | Post-dilution on line haemodiafiltration with citrate dialysate: first clinical experience in chronic dialysis patients[END_REF].

A higher concentration of dialysate Mg appears to have beneficial effects on endothelial cell function and vascular tone in HD patients [START_REF] Navarro-Gonz´alez | Clinical implications of disordered magnesium homeostasis in chronic renal failure and dialysis[END_REF]. Schmaderer et al [START_REF] Schmaderer | Reduced Mortality in Maintenance Haemodialysis Patients on High versus Low Dialysate Magnesium: A Pilot Study[END_REF] investigated the impact of higher dialysate magnesium concentration on 3-year mortality in a pilot observational casecontrol study in patients on maintenance hemodialysis treated with low (0.50 mmol/L) or high (0.75 mmol/L) Mg in the dialysate. In this study, the high dialysate magnesium was associated with a more beneficial cardiovascular survival rate. However, conflicting results emerged from short-term prospective randomized interventional studies. A 28-day parallel group randomized controlled clinical trial conducted by Bressendorf et al [START_REF] Bressendorff | The Effect of Increasing Dialysate Magnesium on Serum Calcification Propensity in Subjects with End Stage Kidney Disease: A Randomized, Controlled Clinical Trial[END_REF] showed that increasing dialysate magnesium from 0.5 to 1 mmol/L decreased calcification propensity in subjects undergoing maintenance hemodialysis. A randomized 4-week crossover study conducted by Del Giorno et al [START_REF] Del Giorno | Consequences of Supraphysiological Dialysate Magnesium on Arterial Stiffness, Hemodynamic Profile, and Endothelial Function in Hemodialysis: A Randomized Crossover Study Followed by a Non-Controlled Follow-Up Phase[END_REF] showed that increasing dialysate Mg from 0.5 to 0.75 mmol/L improved vascular stiffness of subjects undergoing maintenance hemodialysis. A 2week randomized crossover study of low (0.5 mmol/L) versus high (1 mmol/L) dialysate Mg conducted by Jefferies et al [START_REF] Jefferies | High magnesium dialysate does not improve intradialytic hemodynamics or abrogate myocardial stunning[END_REF] failed to demonstrate an improvement of intradialytic hemodynamics or myocardial stunning. Nevertheless, the authors found a significant correlation between Mg changes during the session and changes in global longitudinal strain. Decreasing Mg changes was significantly associated with high Mg dialysate concentration. In line with this, the ongoing Magnesium in chronic haemodialysis (MAGIC-HD) study, a randomized double-blinded standard of care-controlled trial will evaluate the feasibility of sequential Mg increase (from 0.5 to 1 mmol/L) in the dialysate [START_REF] Leenders | Magnesium in chronic haemodialysis (MAGIC-HD): a study protocol for a randomised controlled trial to determine feasibility and safety of using increased dialysate magnesium concentrations to increase plasma magnesium concentrations in people treated with haemodialysis[END_REF].

This study acknowledges some limitations. Firstly, our conclusions are limited by the relatively small size of the population. The factors associated with discordant interpretation using ionized and total forms of divalent cations could be affected by deviation from normality of serum albumin concentration in particular. In addition, as the number of sessions is depicted, individual outliers could skew the data. Secondly, this single-center study was carried out in the South of France and may not be generalizable to other countries with different lifestyles including diet.

In conclusion, our results showed that the use of a dialysate containing 0.75 mmol/L of Mg results in a positive balance for the patient and supports the individualization of dialysate Mg concentrations to modulate plasma concentrations in dialysis patients. Increasing Mg level in citrate dialysis fluids to 0.75 mmol/l appears necessary and could improve clinical outcomes. The monitoring of iMg should be relevant to personalize the prescription of Mg in acetate dialysate fluid according to predialysis level in order to avoid changes in Mg during the session associated with overall longitudinal strain [START_REF] Jefferies | High magnesium dialysate does not improve intradialytic hemodynamics or abrogate myocardial stunning[END_REF]. It has been shown that total intraerythrocyte Mg was comparable in chronic HD using the same dialysate Mg (either 0.5 mmolL or 1 mmol/L) for at least 3 months [START_REF] Kusic | Total serum and intraerythrocyte magnesium concentrations in hemodialysis patients using different dialysate solutions[END_REF], indicating the absence of risk of hypermagnesemia manifestations. In addition, the monitoring of iMg could help to better define hypomagnesemia in the context of hypoalbuminemia, to unmask hypermagnesemia in patients with normal tMg.

CRediT authorship contribution statement

Anne

  -Sophie Bargnoux: Data curation, Formal analysis, Writingoriginal draft. Marion Morena: Data curation, Formal analysis, Writingoriginal draft. Annie Rodriguez: Data curation, Formal analysis, Resources. Caroline Courtais-Coulon: Data curation, Formal analysis. Anne-Marie Dupuy: Writingreview & editing. Nils Kuster: Conceptualization. Lotfi Chalabi: Conceptualization, Resources, Supervision. Jean-Paul Cristol: Conceptualization, Methodology, Supervision, Writingreview & editing.

Funding

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Data availability

Data will be made available on request. Acknowledgements The authors acknowledge Nova Biomedical for providing reagents for this study.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.


Mohamed-Idriss Khaledi
email: mohamed-idriss.khaledi@irt-systemx.fr

Salah Eddine El-Ayoubi
email: salaheddine.elayoubi@centralesupelec.fr

Dusit Niyato
email: dniyato@ntu.edu.sg

Optimization of Function Chaining on the Edge for IoT applications

Keywords: IoT function chaining, Combinatorial Optimization, Edge Networking

With the rapid deployment of Internet of Things (IoT) applications, video processing and streaming requirements are increasing, and edge computing is a good candidate to cope with strong latency and throughput expectations. In this paper, we consider the optimal routing, placement and scaling of IoTbased service function chains for object detection. We propose an edge networking approach dealing with limited CPU and network bandwidth resources in a joint optimization based on Integer Linear Programming for small problem instances, and a graph-based approximation to cope with scalability issues. We evaluate the efficiency of our algorithms through simulations and show that the graph-based approach converges towards a near-optimal solution in negligible time and is thus suitable for real-time function chain placement.

I. INTRODUCTION

With the rapid deployment of smart city and Industrial Internet of Things (IIoT) applications, video streaming and processing is a key issue as many sites are equipped with tens of cameras collecting images and videos for different objectives such as surveillance, security, cyber physical threats, etc. In this context, stakeholders require stringent requirements that include high quality of video streaming with strong latency expectations to rapidly react when an incident such as a physical intrusion. Moreover, Industrial players require efficient deployment solutions for interconnected cameras and video analysis systems. Virtualization techniques are being privileged for this purpose, where both the networking functions are virtualized, using Virtualized Networks Functions (VNF) technology, and application functions are flexibly developed for being deployed on edge nodes.

In order for these functions to be deployed on an infrastructure composed of a multitude of low capacity nodes, they are often presented as a chain of functions, each of them being able to be deployed on an independent physical node, while communicating with the adjacent functions on the chain. The chain has to be deployed on the edge network according to physical infrastructures' available resources in terms of CPU (on servers) and bandwidth (on links). The orchestration of these network services necessitate new algorithms to address the placement, routing and scaling.

In our work, we consider IoT service chains composed by four network functions for object detection. For an object detection application for instance, those functions include video generation, object detection, video compression, object recognition and database update. These IoT applications are deployed on nodes equipped with limited processing capabilities, and interconnected with different communications techniques such as Ethernet, Bluetooth, Wifi, Lora, etc. This heterogeneity of the processing capabilities and communications solutions makes the orchestration and management of the deployed network services harder. We need to investigate efficient optimizations of these resources in near real time to attend systems with good performance (convergence time, solution's cost, etc.).

To deal with these research challenges, we propose two mathematical formulations. One is based on an exact modelling invoking Integer Linear Programming techniques. The second approach is based on graph theory to rapidly attend good solutions in negligible times. Our contribution in this paper is given as follows:

• An exact approach based on integer linear programming approach : this method is based on the description of the convex hull of the addressed joint CPU and network optimization problem for IoT video streaming and processing. • To cope with scalability issues, we propose an approximation approach based on graph modelling. Indeed, we represent IoT chains by trees and physical substrates by undirected graphs with a certain density in terms of number of edges. Hence, our approximation algorithm consists in finding a good mapping of trees on an undirected graph according to different metrics. This will be detailed in next sections.

Note that the novelty of our approaches will be clearly addressed in next sections and their efficiency will be highlighted and compared to the state of the art addressing close research challenges.

The remainder of this paper is organized as follows: next section (Section II) addresses the related work and most close papers in terms of research challenges in NFV and IoT domains. Sections III contains the problem description and details, problem complexity issue and the two proposed solutions based on ILP and Graph theory. Our approaches will be assessed using simulations in Section IV. We conclude the paper in Section V, with some future research challenges that have the merit to be addressed in a close future.

II. RELATED WORK

Paper [START_REF] Pielli | Joint optimization of energy efficiency and data compression in tdma-based medium access control for the iot[END_REF] addressed energy efficiency of the Internet of Things, as many sensors are expected to be completely standalone and able to run for years without battery replacement. The authors proposed a formulation of an optimization problem to jointly design the source coding and transmission strategies for time-varying channels and sources, when considering two criteria based on extending the network lifetime and granting low distortion levels. Authors of this paper applied their offline solution on a IoT network with a dynamic Time Division Multiple Access (TDMA).

Reference [START_REF] Jo | Joint optimized cpu and networking control scheme for improved energy efficiency in video streaming on mobile devices[END_REF] is one of the closest work to our paper. It addresses a joint optimization of power consumption of the CPU and the Wireless Network Interface Card (WNIC) of mobile devices while streaming high quality videos. We recall that the two major energy consuming components in mobile video streaming services are the CPU (that supports video data decoding) and the network interface (that supports data communication). Hence, authors of this paper proposed a joint optimization scheme for improved energy efficiency supporting mobile video streaming services. This is based on the adjustment of the number of video chunks to be downloaded and decoded in each packet. However, they only considered joint optimization of CPU and energy consumption for one mobile device. In our work, we consider a joint optimization of CPU and bandwidth in an IoT network with multiple physical objects and where the number of paths between each couple of nodes can be exponential.

Authors of paper [START_REF] Ananthanarayanan | Real-time video analytics: The killer app for edge computing[END_REF] discussed the problem of real time video analytics in an edge computing environment. Recall that real-time video analysis is used nowadays in several domains (traffic control, surveillance and security, retail store monitoring) and because of the high data volumes, compute demands and latency requirements, cameras represent the most challenging of things in IoT, and large-scale video analytics may well represent the killer application for edge computing. The authors proposed a real-time video analytics system with low resource cost to produce outputs with high accuracy. The proposed approach can be used in several application such as self-driving and smart cars, etc. Nevertheless, the proposed approach do not consider a joint optimization for different resources such as CPU and bandwidth when satisfying latency expectations.

Paper [START_REF] Dräxler | Jasper: Joint optimization of scaling, placement, and routing of virtual network services[END_REF] proposes a mathematical optimization approach over virtual network services for better scaling, placement and routing on a physical substrate. Network services (video streaming, online gaming) are placed and deployed in the network based on fixed predefined descriptors. With the large number of degrees of freedom for finding the best adaptation, deciding scaling, placement, and routing can result in suboptimal decisions for the network and for the running services. They proposed JASPER (Joint optimization of scaling, placement and routing) in which, each network service is described by a service template containing information on the component network services, their interconnection, and resources requirements. Hence, the solutions of reference [START_REF] Dräxler | Jasper: Joint optimization of scaling, placement, and routing of virtual network services[END_REF] are applied using IETF use-cases [5] and examples for an embedding of virtual networks on physical substrates. In our work, we consider limited IoT nodes in terms of available resources, which makes the problem harder and finding feasible solutions more complicated.

Another reference dealing with CPU and bandwidth optimization is given by [START_REF] Samie | Computation offloading and resource allocation for low-power iot edge devices[END_REF]. Authors of this paper proposed a technique to manage computation offloading in a local IoT network under bandwidth constraints. They proposed approaches to separately optimizing CPU and Bandwidth resources, which can lead to sub-optimal solutions of the problem. We propose a joint optimization of the two mentioned limited resources and discuss the scalability of our approaches for large instances.

In the context of VNF orchestration, the Stratos project [START_REF] Gember | Stratos: A networkaware orchestration layer for middleboxes in the cloud[END_REF] proposed a detailed architecture to orchestrate VNFs outsourced to a remote cloud taking considering traffic engineering, VNFs scaling, etc. Nevertheless, this project has addressed only VNF placement solution based only on workloads, and then, chaining constraints are not considered.

References [START_REF] Moens | Vnf-p: A model for efficient placement of virtualized network functions[END_REF] and [START_REF] Cohen | Near optimal placement of virtual network functions[END_REF] propose mathematical models for the VNF chains placement with routing constraints. The proposed models, however, describe a limited number of linear constraints and can only characterize a small portion of the problem convex hull. The proposed exact solutions do not scale for large problem instances. We need deeper modeling that can characterize better (completely) the convex hull of the VNF placement and chaining problem to find near optimal solutions in few seconds and scale with problem size. We propose a competitive graph theory approach with the desired properties of converging quickly to near optimal solutions even for large problem instances.

III. SYSTEM MODEL AND PROBLEM FORMULATION A. System description

We consider a set of sensors that collect data for monitoring and analytics purposes. Each sensor is connected to another one via a link that runs on a wired or wireless technology such as Wifi, Ethernet, Bluetooth, etc. This leads to considering different bandwidth capacities and delay profiles on the links related to each couple of sensors. Moreover, we consider limited processing resources (in our case, represented by CPU cores) at each connected sensor. The montoring and analytics service is composed of a chain of n network functions (denoted by

f 1 Ý → f 2 Ý → ... Ý → f n ) equivalent
to Service Function Chains as described by [10].

Figure 1 illustrates the different components of our system model for a specific service of object detection via surveillance cameras in a restricted area. In this example, each camera captures videos and images and may be equipped by a processing node. Cameras are interconnected and the edge network also incorporates processing servers. Depending on the orchestrator's decision, the videos captured by each of the cameras can be processed locally or send to another processing node. Moreover, the object detection service is composed of a chain of four virtual functions as follows:

1) Function f 1 (Object/Face Detection): detects and extracts in frames all faces in the restricted area (industrial site, for instance) before sending the data to f 2 2) Function f 2 (Object/Face compression): It characterizes each face by limited number of features 3) Function f 3 (Object/Face recognition): the features extracted for each object are compared to a given database 4) Function f 4 (Database enhancement): Once an object/Face is recognized with a high reliability, the new corresponding features are added to the database to improve the quality of future identification

B. Problem description

The objective of this paper is to find an optimal embedding of the virtualized IoT Service Function Chains (IoT-Chains) on the edge networks subject to processing and bandwidth constraints.

Let G " pV , E q be the graph representing the IoT-substrate (interconnected sensors and processing nodes), where |V | and |E | represent the network sizes in terms of number of nodes and edges, respectively. Let G v " pV v , E v q be the virtual request graph composed by n chained VNFs. Note that in the particular example of Figure 1 Each physical object (IoT) j has a limited CPU processing noted by C j . Each physical edge (or link) pj, j 1 q has a limited amount of bandwidth noted by B j,j 1 . If there is no edge between j and j 1 , then the amount of available bandwidth between these two nodes is represented by the smallest available bandwidth on the path between j and j 1 . Each virtual arc pi, i 1 q has a request of b ii 1 of necessary bandwidth.

We aim at developing new algorithms to reach optimal trade-offs between the two criteria of processing and bandwidth with respect to latency requirements. Before proposing these algorithms, we investigate the complexity of the problem.

C. Problem complexity

The addressed problem in this paper is close to the well known Virtual Network Embedding problem (VNE) (see [START_REF] Fischer | Virtual network embedding: A survey[END_REF], and [START_REF] Zhang | Virtual network embedding with opportunistic resource sharing[END_REF] for more details), when the chaining and routing constraints are completely relaxed in the requested graphs. Different research papers have already addressed the question of VNE problem's complexity. For instance, reference [START_REF] Amaldi | On the computational complexity of the virtual network embedding problem[END_REF] discussed the general cases of the problem's NP-Hardness, while reference [START_REF] Khebbache | Virtualized network functions chaining and routing algorithms[END_REF] has shown a special case where the requested graphs are represented as cycles. Hence, in this case, the VNE problem can be similar to the 2-Factor (see [START_REF] Korte | Combinatorial Optimization: Theory and Algorithms[END_REF] for more details) problem which is polynomially solvable. This Fig. 1. IoT based virtual network functions mapping for object detection particular case imposes strong hypothesis and assumptions on the virtual graph. Moreover, a recent paper (see [START_REF] Rost | On the hardness and inapproximability of virtual network embeddings[END_REF]) proved the NP-Completeness (using linear reductions from the well known NP-Complete 3-SAT problem) of the VNE problem in almost of the considered virtual and physical graphs architectures. Hence, relaxing routing constraints of our problem is leading to (in general) an NP-Hard VNE problem, which is hampering solving our problem in polynomial time unless P " N P.

D. Integer Linear Programming approach

Let min i,j,j 1 ,k be the minimum available bandwidth on the k th path between physical nodes j and j 1 for the virtual arc pi, i `1q. Moreover, and for the sake of clarity, we introduce Ppj, iq as the set of all physical nodes j 1 such that there exists a shortest path (a simple Dijkstra algorithm can be used) between nodes j and j 1 in which the minimum available bandwidth (on its arcs) is at least equal to the required amount of bandwidth.

Before going through the details of our mathematical formulation describing the Integer Linear Programming (ILP) of our problem, we propose to describe decision variables that will be used in our joint optimization formulation.

• x i,j is a binary variable equals to 1 if the virtual node/function f i (of the requested chain) is deployed on a physical node j, and equals to 0 otherwise. • y pi,i`1q;pj,j 1 ,kq is a binary variable, the value of which is 1 if a virtual arc pi, i `1q for a link between two virtual functions of the demand is placed on a physical path k joining two physical nodes j and j 1 , and 0 otherwise. • z j is a binary variable, the value of which is 1 if the physical node j hosts at least one virtual function, and 0 otherwise. Our objective function is composed by three terms and consists of jointly optimizing the placement and routing of This approach converges rapidly to near optimal solutions with a complexity of Op|V | 4 q and this will be illustrated in next section.

As it is illustrated in Figure 2, the first level of the extended graph, is used to select a server (according to a given criteria such as high available CPU resources) to host f 1 . Before identifying the second server (in level 2 of the extended graph) to host f 2 using the same criteria, we compute a shortest path, in terms of available bandwidth, between the selected server in the previous level, and all of the available servers (in terms of available CPU) of level 2. We iterate these operations for levels 3 and 4 of the extended graph.

Note that the selected strategies using servers with high available CPU and shortest paths to guarantee a bandwidth efficient routing, can be replaced by other techniques to attend different objectives.

In the following, we provide the pseudo-code (see Algorithm 1) of the graph based heuristic and discuss its performance and convergence through simulations.

IV. NUMERICAL RESULTS

Our proposed approaches are evaluated through a Python implementation using CPLEX [17] solver for the exact approach. We use a laptop with 8Gb of RAM and 2.7Ghz of CPU. The following metrics are used to quantify the efficiency of the two proposed approaches (exact and heuristic):

1) Gap between the objective functions of the proposed approaches: this metric is provided to measure the efficiency of the approximation algorithm benchmarked by the exact method. It is given as follows:

Gapp%q " Exac.Sol ´Heur.Sol Exac.Sol × 100
2) Convergence time: The necessary time to converge to a (near) optimal solution 3) Scalability: The ability of the algorithm to scale to a large graph and provide a solution within an acceptable convergence time.

A. Placement of a single function chain on an edge graph

For each scenario in our simulations, we represent each point by the average value of 50 runs of different collected metrics of the two proposed approaches.

Table II depicts the obtained results when comparing the graph-based approach to the exact solution using convergence time and the gap between the two obtained solutions. In these simulations, we consider graphs with number of nodes in the r5; 80s range. As expected, the exact algorithm outperforms the graph based approach in terms of objective function metric (see columns 3 and 4 in Table II). Nevertheless, the graph based approach converges to near optimal solutions. This is confirmed by the Gap values (see column 7 in Table II) which are decreasing when graph sizes are increasing. Figure 3 depicts the evolution of the gap metric (in terms of CPU/Bandwidth) with the considered graph sizes. The figures illustrate a weak gap value for the two scenarios which indicates and confirms the efficiency of the proposed graphbased method to reach near-optimal solutions. The gap values are decreasing and are vanishing to 5% when considering graphs or IoT substrates of 50 nodes.

Moreover, columns 5 and 6 of Table II show the execution times for the exact and heuristic approaches, respectively. Exponential time execution for the exact approach can be observed, reaching more than 900 ms for small graphs (30 nodes) and 91 seconds for large ones (80 nodes). The graph based approach has negligible time convergence even for larger graphs. Indeed, the exact approach is time consuming especially when investigating an explosive number of paths to guarantee the requested routing of virtual functions. The graph-based approach uses the already described multi-level extended graph, to easily and rapidly detect a feasible/optimal path for routing strategies. To highlight the scalability of the heuristic based approach, we provide in the last row of Table II the results for a graph with 150 nodes and 268 edges, randomly generated. The heuristic approach converges to near optimal solutions in less than 84 ms for the worst case, when the exact approach necessitates more than 25 minutes to attend the optimal solution.

B. Dynamic placement of function chains

In the following, we address simulations with dynamic setting where demands for service function chain placement arrive according to a Poisson process with inter-arrival times (noted by λ ´1) and departures are represented by exponential distribution with a parameter (lifetimes) represented by µ ´1, called also service rate. This dynamic setting allows to compute the system capacity, in terms of rejection rate. Hence, we introduce ρ " λ µ to assess these performances. Note that the event of request rejection occurs when a new request arrives while the system his still processing a large number of previous requests. This is modeled in our case by a buffer for requests of limited size (10 in the numerical results). When this buffer is full, new arriving requests are rejected. This rejection is thus related to the algorithm's necessary convergence time: The faster the convergence, the lowest is the probability of buffer overflow.

Figure 4 reports the rejection rate evolution for different values of system load. We selected graphs with 15, 30 and 50 nodes for this simulation. As the convergence time for the exact (ILP) approach increases exponentially with the graph size, the rejection rate is non negligeable for a larger graph size. When the load increases (i.e. the average number of new requests increases), the rejection rate also increases. Note that for the graph-based approach, the rejection rate is close to zero. This is due to the negligible necessary time to converge to near optimal solution using the heuristic approach. This result is also confirmed by simulations of Figure 5 illustrating the rejection rate of the exact algorithm for increasing physical infrastructures size. With no surprises, systems with high values of ρ are saturated rapidly compared to systems with small values of ρ. In fact, high values of ρ lead to bursts of arrivals that can not be processed in acceptable times, as the exact algorithm suffers from slow convergence time.

V. CONCLUSION AND FUTURE WORK

This paper addressed the problem of resource allocation on an edge network for IoT-based services and discussed the trade-off in terms of processing and bandwidth optimization. We considered a service composed of a chain of functions and developed optimization algorithms for the placement of the functions on the graph composed of heterogeneous nodes and links. We investigated the optimal approach based on Linear Integer Programming and a heuristic based on Graph theory.

  , |V v | " 4 and |E v | " 3.

Fig. 2 .

 2 Fig. 2. Extended multi-level graph construction

Fig. 3 .

 3 Fig. 3. Evolution of the gap (objective functions) with graph sizes

Fig. 4 .

 4 Fig. 4. Exact algorithm's rejection rate for different graph sizes

TABLE II EXACT

 II VS APPROXIMATION ALGORITHMS PERFORMANCE

	# nodes	# links	Exa. Obj	Heu.Obj	Exa.Time(ms)	Heu.Time(ms)	Gap%
	5	7	14.58	11.47	14.72	0.24	21.33
	10	16	19.65	16.41	72.64	1.56	16.48
	15	25	21.49	19.08	171.72	2.75	11.22
	21	36	23.16	21.10	418.86	9.43	8.90
	25	43	23.92	21.91	632.81	11.34	8.40
	30	52	24.17	22.17	937.66	17.33	8.29
	40	70	25.27	23.94	14607.15	23.56	5.27
	50	88	26.28	25.18	26110.11	30.78	4.19
	70	124	26.47	25.21	58235.02	45.78	4.75
	80	142	26.52	25.28	91514.11	53.32	4.69
	150	268	24.89	23.85	308015.30	83.41	4.18

We highlighted the efficiency of our approaches through simulations, using different graph requests and instances. Future work will consider reinforcement learning techniques to improve the optimization process and hence minimize the rejection rate of the graph-based algorithm.

the four chained virtual functions when minimizing the total CPU core consumption and number of used objects. This is given by: max F "

(1)

pmin ijj 1 k ´bpi,i`1q qy pi,i`1qpj,j 1 ,kq where K pj, j 1 q is the set of all available and feasible paths between nodes j and j 1 .

Our optimization problem for the placement and routing of virtual chains has a set of constraints described in the sequel:

Constraints (2) guarantee that each virtual node/function function f i , is deployed on exactly one physical node/IoT object.

Constraints (3) ensure that the placement of virtual functions cannot consume more resources than that available on the selected physical node/IoT object.

Constraints (4) ensure that only selected servers will be taken into account in the first term of the objective function.

x i,j ≤ ÿ j 1 ∈Ppj,iq

Constraints (5) are guaranteeing the chaining of the n virtualized functions

∀i ∈ t1, ..., n ´1u, ∀j ∈ V Constraints ( 6) and ( 7) are provided to ensure that if a virtual node/function i is deployed on a physical node j, i.e. x i,j " 1, and the virtual node i `1 is hosted by a physical node j 1 , i.e. x i`1,j 1 " 1, then the virtual arc pi, i `1q should be deployed on the k th physical path starting from node j to node j 1 , i.e. y pi,i`1q;pj,j 1 ,kq " 1. The available CPU amount in node j K pj,j 1 ,iq a set of all available and feasible (a path with the minimum bandwidth on all its edges is higher than the requested bandwidth for the arc pi, i `1q) paths between nodes j and j 1 for the virtual arc pi, i `1q min i,j,j 1 ,k

Minimum available bandwidth on the k th feasible path between physical nodes j and j 1 for the virtual arc pi, i `1q

y pi,i`1qpj,j 1 ,kq " 1, ∀i ∈ t1, ..., n ´1u (8) Constraints ( 8) guarantee that each virtual arc pi, i `1q is deployed on exactly one physical path. There is no flow split considered in our formulation.

Constraints ( 9) are provided to guarantee a minimum bandwidth availability to satisfy the requested routing between each couple of selected physical nodes j and j 1 .

Table I summarizes the whole of parameters and variables used in our mathematical formulation.

E. Graph-based approach

ILP approach suffers from scalability issues and then cannot address large problem instances. Hence, to cope with this issue, we propose a scalable method based on graph theory. This approach is based on a weighted extended 4-level graph. At each level, we represent a set of physical nodes/IoTs able to host (in terms of available CPU cores) some virtual functions f . There is an arc between a node S l j (a physical node j at the level l(l ≤ 4)) and S l`1 j 1 (a physical node j 1 at the level l `1) with a weight w j,j 1 representing the available amount of bandwidth between servers j and j 1 . Figure 2 is built according to the example provided by Figure 1. This provides more details on the construction of the extended multi-level graph.

The constructed multi level graph of Figure 2 allows easily to select physical servers to host virtualized functions when guaranteeing (thanks to the multi-level property) the routing