Restartability Manage- ment in the Cisco Core Router CRS/NG Stefan Schaeckeler (Cisco Systems, Inc.) Ashwin Narasimha Murthy (Google, Inc.)

Slides:



Advertisements
Similar presentations
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
Advertisements

Chapter 17 vector and Free Store Bjarne Stroustrup
Design Patterns.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. *See PowerPoint Lecture Outline for a complete, ready-made.
Chao Liu, Chen Chen, Jiawei Han, Philip S. Yu
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 116.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 107.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 40.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 28.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 44.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 101.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 58.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 112.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 75.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Chapter 1 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Building a Fast, Virtualized Data Plane with Programmable Hardware Bilal Anwer Nick Feamster.
Chapter 3: Linked List Tutor: Angie Hui
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Data recovery 1. 2 Recovery - introduction recovery restoring a system, after an error or failure, to a state that was previously known as correct have.
ZMQS ZMQS
Pointers.
CS16: Introduction to Data Structures & Algorithms
Break Time Remaining 10:00.
SE-292 High Performance Computing
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park
Linked List A linked list consists of a number of links, each of which has a reference to the next link. Adding and removing elements in the middle of.
Linked Lists.
Data Structures ADT List
FIFO Queues CSE 2320 – Algorithms and Data Structures Vassilis Athitsos University of Texas at Arlington 1.
Pearls of Functional Algorithm Design Chapter 1 1 Roger L. Costello June 2011.
1 Designing Hash Tables Sections 5.3, 5.4, Designing a hash table 1.Hash function: establishing a key with an indexed location in a hash table.
1 Symbol Tables Chapter Sedgewick. 2 Symbol Tables Searching Searching is a fundamental element of many computational tasks looking up a name.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
The Modular Structure of Complex Systems Team 3 Nupur Choudhary Aparna Nanjappa Mark Zeits.
Project Scheduling: Lagging, Crashing, and Activity Networks
25 July, 2014 Hailiang Mei, TU/e Computer Science, System Architecture and Networking 1 Hailiang Mei Remote Terminal Management.
15. Oktober Oktober Oktober 2012.
Virtual Switching Without a Hypervisor for a More Secure Cloud Xin Jin Princeton University Joint work with Eric Keller(UPenn) and Jennifer Rexford(Princeton)
We are learning how to read the 24 hour clock
Slide 01 (of 22)Title 26/04/2010 Version 1.0 GUIDE to ‘SIMPLE’ Mouse click to continue AN OVERVIEW OF BT’s CONVEYACE INVOICE RECONCILIATION ASSISTANCE.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Week 1.
Visions of Australia – Regional Exhibition Touring Fund Applicant organisation Exhibition title Exhibition Sample Support Material Instructions 1) Please.
SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
Clock will move after 1 minute
1 Unit 1 Kinematics Chapter 1 Day
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
Chapter 11: File System Implementation
1.1 CAS CS 460/660 Introduction to Database Systems File Organization Slides from UC Berkeley.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
Page 111/15/2015 CSE 30341: Operating Systems Principles Chapter 11: File System Implementation  Overview  Allocation methods: Contiguous, Linked, Indexed,
File System Implementation
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Overview: File system implementation (cont)
CSCE 313 – Introduction to UNIx process
Presentation transcript:

Restartability Manage- ment in the Cisco Core Router CRS/NG Stefan Schaeckeler (Cisco Systems, Inc.) Ashwin Narasimha Murthy (Google, Inc.)

Table of Contents System Overview CRS/NG Restartability Overview − Problem Definition and High Level Solution Concrete Example − Statistics Resource Manager Library Conclusion 2

System Overview Core Router Extremely complex System SW: 16 MLOC HW: several chasses, LCs (1 CPU, 5 NPUs, chips galore), RPs (1 CPU, chips galore), fabric cards, blade cards, … Forms distributed System % Uptime 3

System Overview System Manager: restarts crashed Process HW bug SW bug Process must maintain State (after Crash) CRS/NG Approach Key data structures in shared memory Well written algorithm guarantee consistency CRS 1  CRS 3  CRS/NG (final name?) 4

CRS/NG Restartability Overview CRS/NG runs Cisco IOS/XR Cisco IOS/XR Abstraction Layer on Linux Sophisticated IPC Sophisticated shared memory API  Special malloc for shared memory  Static configuration file –Mapping identifiers to fixed virtual addresses –STATS_RESTART 0x  (Re)attaching to shared memory via identifier  Previously allocated objects always available  … 5

CRS/NG Restartability Overview Process requiring Restartability Key data-structures in shared memory Careful algorithm design to avoid Temporary inconsistencies account1 := account1+X; account2 := account2-X; Pointer operations (disconnection of linked lists) Crashes during IPCs Crashes before a return; (caller records success) Optional recovery phase Compromises are possible 6

Concrete Example: Statistics Resource Manager Library HW: Extremely simplified View on CRS/NG 7

Concrete Example: Statistics Resource Manager Library SW: Somewhat simplified View on CRS/NG Statistics Manager 8

Concrete Example: Statistics Resource Manager Library Client Application / Library crashes  Restart Client Application: State is gone Stats pointers are lost Other state is lost Stats Lib State is gone Stats pointers are lost Solution for Stats Lib Keep freelists in shared memory Smart algorithm for keeping state consistent 9

Concrete Example: Statistics Resource Manager Library Step 1: Keeping State in Shared Memory 01 stats_cl_ctx_st *mstats_cl_bind (char *name) { 02 void *shmem; 03 stats_cl_ctx_st *con; /* open shmem at a predetermined address */ 06 shmem = shmwin_attach(SSE_STATS_RESTART_ADDRESS); // posix mmap: MAP_FIXED flag 07 con=shmem+name_to_offset(name); if (strcmp(con->name, name)) { 10 /* first bind */ /* init "empty" context */ 13 con->freelist[0..max]=NULL; 14 con->mutex=0; 15 strcpy(con->name, name); 16 } else { 17 /* restart */ 18 /* do nothing, just return con */ 18 } 20 return con; 21 } 10

Concrete Example: Statistics Resource Manager Library Step 2a: Smart Algorithm − A pragmatic Approach (chosen for CRS/NG) Few Concepts:  (Re-)moving nodes from freelist Worst case: a page is lost (bad?)  Requesting fresh page from server Worst case: page is lost (bad?)  Updating bitmap: mark some pointers as allocated − client does not pick up Worst case: some pointers are lost (bad?) 11

Concrete Example: Statistics Resource Manager Library Discussion of worst Case Scenarios A page (or a few Pointers within) is lost = 256 out of 8 million stats pointers in NPU memory − no big deal = 80 byte out of several GB of CPU memory for node structure − no big deal Client frees a Pointer from a lost Page  Error Code is returned  Client is irritated but has to ignore it We never give out same Pointer twice 12

Concrete Example: Statistics Resource Manager Library Step 2b: Smart Algorithm − A perfect Approach Complicated Algorithm / Very difficult Implementation Further pointers in shared memory Need to figure out where crashed and continue from there Requirement: interacting Libraries and Processes must be "perfect" as well 13

Conclusion Pragmatic Approach of CRS/NG + Easy to implement +/− Crashes: worst Case: small Mem. Leak + No Run-time Performance Hit Perfect Approach + Very difficult to implement  Error prone + Crashes: no Memory Leak − Perhaps Run-time Performance Hit 14

Thank You 15 Platinum Sponsors: Gold Sponsors: Silver Sponsors: Organization Sponsors