Putting your users in a Box Greg Thain Center for High Throughput Computing.

Slides:



Advertisements
Similar presentations
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advertisements

Using Matrices in Real Life
Advanced Piloting Cruise Plot.
Our library has two forms of encyclopedias: Hard copy and electronic versions. The first is simply the old-fashioned "book on the shelf" type of encyclopedia.
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
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.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
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
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
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.
FACTORING Think Distributive property backwards Work down, Show all steps ax + ay = a(x + y)
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
1 Processes and Threads Creation and Termination States Usage Implementations.
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
Learning to show the remainder
ZMQS ZMQS
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Break Time Remaining 10:00.
1 2 In a computer system, a file is a collection of information with a single name, such as addresses.doc, or filebackup.ppt, or ftwr.exe, or guidebook.xls.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
ABC Technology Project
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Squares and Square Root WALK. Solve each problem REVIEW:
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
© 2012 National Heart Foundation of Australia. Slide 2.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Januar MDMDFSSMDMDFSSS
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Clock will move after 1 minute
A SMALL TRUTH TO MAKE LIFE 100%
PSSA Preparation.
Essential Cell Biology
The DDS Benchmarking Environment James Edmondson Vanderbilt University Nashville, TN.
Installing Windows XP Professional Using Attended Installation Slide 1 of 30Session 8 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Putting your users in a Box John (TJ) Knoeller Center for High Throughput Computing.
Containing HTCondor Greg Thain INFN 2016.
Linux Containers Overview & Roadmap
Putting your users in a Box
Presentation transcript:

Putting your users in a Box Greg Thain Center for High Throughput Computing

› Why put job in a box? › Old boxes that work everywhere* »*Everywhere that isn’t Windows › New shiny boxes 2 Outline

1) Protect the machine from the job. 2) Protect the job from the machine. 3) Protect one job from another. 3 Protections 3

› Allows nesting › Need not require root › Can’t be broken out of › Portable to all OSes › Allows full management:  Creation // Destruction  Monitoring  Limiting The perfect box 4

› Resources a job can (ab)use  CPU  Memory  Disk  Signals  Network. A Job ain’t nothing but work 5

› HTCondor Preempt expression  PREEMPT = TARGET.MemoryUsage > threshold ProportionalSetSizeKb > threshold › setrlimit call  USER_JOB_WRAPPER  STARTER_RLIMIT_AS Previous Solutions 6

› Newish stuff From here on out… 7

› Some people see this problem, and say › “I know, we’ll use a Virtual Machine” The Big Hammer 8

› Might need hypervisor installed  The right hypervisor (the right Version…) › Need to keep full OS image maintained › Difficult to debug › Hard to federate › Just too heavyweight Problems with VMs 9

› Want opaque box › Much LXC work applicable here › Work with Best feature of HTCondor ever? Containers, not VMs 10

› ASSIGN_CPU_AFFINITY=true › Now works with dynamic slots › Need not be root › Any Linux version  Only limits the job CPU AFFINITY 11

› You can’t kill what you can’t see › Requirements:  HTCondor  RHEL 6  USE_PID_NAMESPACES = true (off by default)  Doesn’t work with privsep  Must be root PID namespaces 12

PID Namespaces 13 Init (1) Master (pid 15) Startd (pid 26) Starter (pid 39) Job (pid 1) Starter (pid 73) Job (pid 1)

› “Lock the kids in their room” › Startd advertises set › NAMED_CHROOT = /foo/R1,/foo/R2 › Job picks one: › +RequestedChroot = “/foo/R1” › Make sure path is secure! Named Chroots 14

› Two basic kernel abstractions: › 1) nested groups of processes › 2) “controllers” which limit resources Control Groups aka “cgroups” 15

› Implemented as filesystem  Mounted on /sys/fs/cgroup, or /cgroup or … › User-space tools in flux  Systemd  Cgservice › /proc/self/cgroup Control Cgroup setup 16

› Cpu › Memory › freezer Cgroup controllers 17

› Requires:  RHEL6, RHEL7 even better  HTCondor  Rootly condor  BASE_CGROUP=htcondor  And… cgroup fs mounted… Enabling cgroups 18

› Starter puts each job into own cgroup  Named exec_dir + job id › Procd monitors  Procd freezes and kills atomically › MEMORY attr into memory controller › CGROUP_MEMORY_LIMIT_POLICY  Hard or soft  Job goes on hold with specific message Cgroups with HTCondor 19

Cgroup artifacts 20 04/22/13 11:39:08 Requesting cgroup for job … StarterLog: ProcLog … cgroup to for ProcFamily /22/13 11:39:13 : PROC_FAMILY_GET_USAGE 04/22/13 11:39:13 : gathering usage data for family with root pid /22/13 11:39:17 : PROC_FAMILY_GET_USAGE 04/22/13 11:39:17 : gathering usage

$ condor_q -- Submitter: localhost : : localhost :58873 ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD 2.0 gthain 4/22 11: :00:02 R sleep 3600 › $ ps ax | grep 3600 gthain condor_exec.exe

$ cat /proc/2727/cgroup st A process with Cgroups 22

$ cd /sys/fs/cgroup/memory/htcondor/condor_exec_sl $ cat memory.usage_in_bytes $ cat tasks

› Or, “Shared subtrees” › Goal: protect /tmp from shared jobs › Requires  Condor  RHEL 5  Doesn’t work with privsep  HTCondor must be running as root  MOUNT_UNDER_SCRATCH = /tmp,/var/tmp MOUNT_UNDER_SCRATCH 24

MOUNT_UNDER_SCRATCH=/tmp,/var/tmp Each job sees private /tmp, /var/tmp Downsides: No sharing of files in /tmp MOUNT_UNDER_SCRATCH 25

Future work 26

Future Work Docker Universe Containers give Linux processes a private: Cgroups + Repo for images Bind mounts

› Questions? › See cgroup reference material in kernel doc cgroups.txthttps:// cgroups.txt › LKN article about shared subtree mounts: Conclusion 28