SlideShare a Scribd company logo
SLINKY: Static Linking
Reloaded
Christian Collberg, John Hartman et. al.
CSC 630, Fall 2013, University of Arizona
Sumin Byeon
Linking
• Combining a program and its libraries into
a single executable
• Resolving symbolic names of variables and
functions into their resulting addresses
Static Linking
• Incorporating libraries at compile-time[^1]
• Pros
• Easy to understand, implement, and use
• Self-contained apps
• Cons
• Duplications - spatial inefficiency
[^1]: More precisely, at link-time
Dynamic Linking
• Deferring linking until run-time
• Pros
• Space efficient (disk and memory)
• Flexibility
• Cons
• Complexity (e.g., version, path, dependency, etc.)
• Potential security risks
SLINKY
• Implicit sharing of libraries and data by
deduplication
• Best of both worlds
• Sharing memory pages
• Sharing disk space
• Reducing network bandwidth
Sharing Memory Pages
• When a page modified, it is no longer valid for
other processes. Potential solution: copy-on-
write.
• Share read-only code pages
• Data pages are likely modified, thus unlikely to
be shared anyway
• slink, digest, a set of Linux kernel
modifications
Slink
• Position independent code required
• Converts a dynamically linked executable
into a statically linked executable
• Finds all necessary libraries, organizes them
in the process’s address space, and resolves
symbols
Digest
• Inserts the digests for each code page
• Linux page: 4 KB, digest: 20 bytes - less than
0.5% overhead
Kernel Modifications
• Per-process digest table (PDT) - Maps page
number to digest
• Global digest table (GDT) - Contains the
digest of every code page in memory
Security
• Possibility of inserting malicious code
• Digest verification before loading a page to
the GDT
• Memory protection hardware
• SHA-1 or a different hash function of your
choice
Sharing Disk Space
• Breaking an executable into variable-size
chunks
• Only one copy of each unique chunk is
stored
• Similar idea to LBFS
Reducing Network
Bandwidth
• Transfers only a fraction of the chunks
• The initial transfer represents a worst-case
scenario
• Deduplication!
Performance
• Measured:
• Elapsed time to build the Linux kernel
• Page fault handling in both an unmodified Linux kernel
and a modified kernel
• Number of page faults - SLINKY’s effect on the page fault
rate and the memory footprints
• Suffers fewer page faults than their dynamically linked
counterparts
• Page fault rate decreased after several other executables
have added pages to the GDT
Memory Footprint
Storage Space
Network Bandwidth
• File size:
SLINKY exe >>>>> dynamically linked exe
• Amount of transferred data:
SLINKY exe > dynamically linked exe
Conclusion
• SLINKY overcomes disadvantages of static
linking by implicitly sharing data chunks
based on their digests
• Trivial performance degradation,
comparable memory footprint to dynamic
linking, and low overhead on storage

More Related Content

PDF
Docker composeで開発環境をメンバに配布せよ
PDF
Kubernetes in 20 minutes - HDE Monthly Technical Session 24
PDF
Demystifying kubernetes
PPTX
Introduction to docker and oci
PDF
Dockerを利用したローカル環境から本番環境までの構築設計
PPTX
Build optimization mechanisms in GitLab and Docker
PDF
Using Containers for Continuous Integration and Continuous Delivery
PDF
Docker Tips And Tricks at the Docker Beijing Meetup
Docker composeで開発環境をメンバに配布せよ
Kubernetes in 20 minutes - HDE Monthly Technical Session 24
Demystifying kubernetes
Introduction to docker and oci
Dockerを利用したローカル環境から本番環境までの構築設計
Build optimization mechanisms in GitLab and Docker
Using Containers for Continuous Integration and Continuous Delivery
Docker Tips And Tricks at the Docker Beijing Meetup

What's hot (20)

KEY
MongoDB as Search Engine Repository @ MongoTokyo2011
PDF
The Lies We Tell Our Code (#seascale 2015 04-22)
PDF
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
PDF
Kubernetes in 30 minutes (2017/03/10)
PDF
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
PDF
Docker 활용법: dumpdocker
PDF
Docker, Docker Swarm mangement tool - Gorae
PDF
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
PDF
Introduction To Docker
PPTX
Introduction to Docker
PPTX
Kubernetes Introduction
PDF
SCALE 2011 Deploying OpenStack with Chef
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
PDF
Docker1.12イングレスロードバランサ
PDF
Containers: The What, Why, and How
PDF
手把手帶你學 Docker 入門篇
PDF
Docker at Djangocon 2013 | Talk by Ken Cochrane
PDF
[DockerCon 2019] Hardening Docker daemon with Rootless mode
PDF
Real-World Docker: 10 Things We've Learned
PDF
Docker 101 @KACST Saudi HPC 2016
MongoDB as Search Engine Repository @ MongoTokyo2011
The Lies We Tell Our Code (#seascale 2015 04-22)
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
Kubernetes in 30 minutes (2017/03/10)
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Docker 활용법: dumpdocker
Docker, Docker Swarm mangement tool - Gorae
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
Introduction To Docker
Introduction to Docker
Kubernetes Introduction
SCALE 2011 Deploying OpenStack with Chef
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Docker1.12イングレスロードバランサ
Containers: The What, Why, and How
手把手帶你學 Docker 入門篇
Docker at Djangocon 2013 | Talk by Ken Cochrane
[DockerCon 2019] Hardening Docker daemon with Rootless mode
Real-World Docker: 10 Things We've Learned
Docker 101 @KACST Saudi HPC 2016
Ad

Viewers also liked (12)

PDF
Are Credit Cards Evil
PDF
【AIDちゃんねる】アプリ生産数日本一!? Goodia代表に聞く ”アプリを創ること”「ほろ酔いナイト」vol.01
PDF
Oracle WebLogic for DevOps
DOCX
Ashleigh Bird C.V. 2016
PDF
Oracle Cloud verleiht ADF-Anwendungen Flügel
PDF
Small enhancements - Edition 2016B
PDF
超絶UXを実現したい!小規模Web制作会社でもフロントエンドのスキルを磨く方法と実践 【実践編】 先生:桟 義雄
PPTX
Chicago CTA Expo
PDF
営業職×専門性=高年収 ~未経験からMRになる方法~ 先生:梅澤悠希先生
PDF
【1限目】超効率型英語学習法~TOEIC265点だった僕が、海外で就職しちゃいました~ 先生:佐藤渉先生
PPTX
Mapa mental analy
Are Credit Cards Evil
【AIDちゃんねる】アプリ生産数日本一!? Goodia代表に聞く ”アプリを創ること”「ほろ酔いナイト」vol.01
Oracle WebLogic for DevOps
Ashleigh Bird C.V. 2016
Oracle Cloud verleiht ADF-Anwendungen Flügel
Small enhancements - Edition 2016B
超絶UXを実現したい!小規模Web制作会社でもフロントエンドのスキルを磨く方法と実践 【実践編】 先生:桟 義雄
Chicago CTA Expo
営業職×専門性=高年収 ~未経験からMRになる方法~ 先生:梅澤悠希先生
【1限目】超効率型英語学習法~TOEIC265点だった僕が、海外で就職しちゃいました~ 先生:佐藤渉先生
Mapa mental analy
Ad

Similar to SLINKY: Static Linking Reloaded (20)

PDF
Tachyon memory centric, fault tolerance storage for cluster framworks
PDF
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
PPTX
Chaptor 2- Big Data Processing in big data technologies
PDF
Distributed Data processing in a Cloud
PPTX
Cloud computing UNIT 2.1 presentation in
KEY
Cloud Computing and Genealogical Collaboration
PPTX
Leveraging Endpoint Flexibility in Data-Intensive Clusters
PPTX
Introduction to Data Storage and Cloud Computing
PDF
Petabyte scale on commodity infrastructure
PPTX
Cnam azure 2015 storage
PPTX
PDF
Benchmarking Personal Cloud Storage
PDF
Scalable Storage for Massive Volume Data Systems
PDF
Hot sec10 slide-suzaki
PPTX
Large scale computing with mapreduce
KEY
Storing and distributing data
PPTX
unit 2 - book ppt.pptxtyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
PPTX
Enterprise Software Development Patterns
PPTX
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
PPTX
MongoDB Internals
Tachyon memory centric, fault tolerance storage for cluster framworks
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Chaptor 2- Big Data Processing in big data technologies
Distributed Data processing in a Cloud
Cloud computing UNIT 2.1 presentation in
Cloud Computing and Genealogical Collaboration
Leveraging Endpoint Flexibility in Data-Intensive Clusters
Introduction to Data Storage and Cloud Computing
Petabyte scale on commodity infrastructure
Cnam azure 2015 storage
Benchmarking Personal Cloud Storage
Scalable Storage for Massive Volume Data Systems
Hot sec10 slide-suzaki
Large scale computing with mapreduce
Storing and distributing data
unit 2 - book ppt.pptxtyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Enterprise Software Development Patterns
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
MongoDB Internals

More from Sumin Byeon (15)

PDF
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
PDF
BD Talk 2017 봄 - 원정코딩
PDF
NDC 2017 마이크로토크 - 프로그래머가 뉴스 읽는 법
PDF
NDC 2016 마이크로토크 - 프로그래머가 투자하는 법
PDF
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
PDF
더 나은 번역기는 나의 삶을 어떻게 바꾸었는가
PDF
2015 PyCon - 프로그래머가 이사하는 법
PDF
[야생의 땅: 듀랑고]의 식물 생태계를 담당하는 21세기 정원사의 OpenCL 경험담
PDF
Cross-Language Information Retrieval
PDF
Project Proposal: Translation Example Search Engine
PDF
Self-Tuning Wireless Network Power Management
PDF
Error tolerant search
KEY
Git with bitbucket
KEY
Git with bitbucket (draft)
KEY
RNA Secondary Structure Prediction
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
BD Talk 2017 봄 - 원정코딩
NDC 2017 마이크로토크 - 프로그래머가 뉴스 읽는 법
NDC 2016 마이크로토크 - 프로그래머가 투자하는 법
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
더 나은 번역기는 나의 삶을 어떻게 바꾸었는가
2015 PyCon - 프로그래머가 이사하는 법
[야생의 땅: 듀랑고]의 식물 생태계를 담당하는 21세기 정원사의 OpenCL 경험담
Cross-Language Information Retrieval
Project Proposal: Translation Example Search Engine
Self-Tuning Wireless Network Power Management
Error tolerant search
Git with bitbucket
Git with bitbucket (draft)
RNA Secondary Structure Prediction

Recently uploaded (20)

PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
DOCX
search engine optimization ppt fir known well about this
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Getting Started with Data Integration: FME Form 101
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Unlock new opportunities with location data.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
The various Industrial Revolutions .pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
Chapter 5: Probability Theory and Statistics
PPT
What is a Computer? Input Devices /output devices
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
observCloud-Native Containerability and monitoring.pptx
Hindi spoken digit analysis for native and non-native speakers
DP Operators-handbook-extract for the Mautical Institute
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A novel scalable deep ensemble learning framework for big data classification...
search engine optimization ppt fir known well about this
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Getting Started with Data Integration: FME Form 101
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Unlock new opportunities with location data.pdf
Developing a website for English-speaking practice to English as a foreign la...
A review of recent deep learning applications in wood surface defect identifi...
The various Industrial Revolutions .pptx
1 - Historical Antecedents, Social Consideration.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
WOOl fibre morphology and structure.pdf for textiles
CloudStack 4.21: First Look Webinar slides
Chapter 5: Probability Theory and Statistics
What is a Computer? Input Devices /output devices
A comparative study of natural language inference in Swahili using monolingua...
observCloud-Native Containerability and monitoring.pptx

SLINKY: Static Linking Reloaded

  • 1. SLINKY: Static Linking Reloaded Christian Collberg, John Hartman et. al. CSC 630, Fall 2013, University of Arizona Sumin Byeon
  • 2. Linking • Combining a program and its libraries into a single executable • Resolving symbolic names of variables and functions into their resulting addresses
  • 3. Static Linking • Incorporating libraries at compile-time[^1] • Pros • Easy to understand, implement, and use • Self-contained apps • Cons • Duplications - spatial inefficiency [^1]: More precisely, at link-time
  • 4. Dynamic Linking • Deferring linking until run-time • Pros • Space efficient (disk and memory) • Flexibility • Cons • Complexity (e.g., version, path, dependency, etc.) • Potential security risks
  • 5. SLINKY • Implicit sharing of libraries and data by deduplication • Best of both worlds • Sharing memory pages • Sharing disk space • Reducing network bandwidth
  • 6. Sharing Memory Pages • When a page modified, it is no longer valid for other processes. Potential solution: copy-on- write. • Share read-only code pages • Data pages are likely modified, thus unlikely to be shared anyway • slink, digest, a set of Linux kernel modifications
  • 7. Slink • Position independent code required • Converts a dynamically linked executable into a statically linked executable • Finds all necessary libraries, organizes them in the process’s address space, and resolves symbols
  • 8. Digest • Inserts the digests for each code page • Linux page: 4 KB, digest: 20 bytes - less than 0.5% overhead
  • 9. Kernel Modifications • Per-process digest table (PDT) - Maps page number to digest • Global digest table (GDT) - Contains the digest of every code page in memory
  • 10. Security • Possibility of inserting malicious code • Digest verification before loading a page to the GDT • Memory protection hardware • SHA-1 or a different hash function of your choice
  • 11. Sharing Disk Space • Breaking an executable into variable-size chunks • Only one copy of each unique chunk is stored • Similar idea to LBFS
  • 12. Reducing Network Bandwidth • Transfers only a fraction of the chunks • The initial transfer represents a worst-case scenario • Deduplication!
  • 13. Performance • Measured: • Elapsed time to build the Linux kernel • Page fault handling in both an unmodified Linux kernel and a modified kernel • Number of page faults - SLINKY’s effect on the page fault rate and the memory footprints • Suffers fewer page faults than their dynamically linked counterparts • Page fault rate decreased after several other executables have added pages to the GDT
  • 16. Network Bandwidth • File size: SLINKY exe >>>>> dynamically linked exe • Amount of transferred data: SLINKY exe > dynamically linked exe
  • 17. Conclusion • SLINKY overcomes disadvantages of static linking by implicitly sharing data chunks based on their digests • Trivial performance degradation, comparable memory footprint to dynamic linking, and low overhead on storage