Controlling a Solver Execution: the runsolver Tool

Similar documents
Lecture Topics. Announcements. Today: Memory Management (Stallings, chapter ) Next: continued. Self-Study Exercise #6. Project #4 (due 10/11)

Fall 2015 COMP Operating Systems. Lab #7

NetApp Sizing Guidelines for MEDITECH Environments

Algorithms and Data Structures

Understanding OpenGL

Application of Maxwell Equations to Human Body Modelling

CSE 237A Winter 2018 Homework 1

10-Bit A/D Converter: Example of Settings for Conversion in Single Mode

Real Time Operating Systems Lecture 29.1

LSI and Circuit Technologies for the SX-8 Supercomputer

Chapter 16 - Instruction-Level Parallelism and Superscalar Processors

6 System architecture

Administrative notes January 9, 2018

ENGINEERING KNOWLEDGE TEST (EKT) COMPUTER SCIENCE STREAM BOOKLET SERIES H

Cutting a Pie Is Not a Piece of Cake

Killzone Shadow Fall: Threading the Entity Update on PS4. Jorrit Rouwé Lead Game Tech, Guerrilla Games

Permutations. Example 1. Lecture Notes #2 June 28, Will Monroe CS 109 Combinatorics

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University

FAQ Setting up the game First Player Who is the first player?

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues

Lecture #20 Analog Inputs Embedded System Engineering Philip Koopman Wednesday, 30-March-2016

Mind Ninja The Game of Boundless Forms

USER GUIDE. User guide of the LoRaWAN indoor TH(Temperature) sensor (085)-000 LoRaWAN indoor TH(Temperature)

GUIDE TO GAME LOBBY FOR STRAT-O-MATIC COMPUTER BASEBALL By Jack Mitchell

CS649 Sensor Networks IP Lecture 9: Synchronization

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #16

1 Permutations. Example 1. Lecture #2 Sept 26, Chris Piech CS 109 Combinatorics

GC for interactive and real-time systems

AGENT PLATFORM FOR ROBOT CONTROL IN REAL-TIME DYNAMIC ENVIRONMENTS. Nuno Sousa Eugénio Oliveira

Objective Questions. (a) Light (b) Temperature (c) Sound (d) all of these

Application-Managed Flash Sungjin Lee, Ming Liu, Sangwoo Jun, Shuotao Xu, Jihong Kim and Arvind

A survey on broadcast protocols in multihop cognitive radio ad hoc network

GE Fanuc IC695ALG600. Rx3i PacSystem

Interactive Game Design with Alice Bit by Bit: Advancing Cyber Security

A High-Throughput Memory-Based VLC Decoder with Codeword Boundary Prediction

9/2/2013 Excellent ID. Operational Manual eskan SADL handheld scanner

Low-Power CMOS VLSI Design

The Critical Role of Firmware and Flash Translation Layers in Solid State Drive Design

GWiQ-P: : An Efficient, Decentralized Quota Enforcement Protocol

Public Key Encryption

ECE 6390: Satellite Communications and Navigation Systems TEST 3 (Fall 2004)

Nicolò Antonante Kristian Bergaplass Mumba Collins

Low latency in 4.9G/5G

High Speed Clock Distribution Design Techniques for CDC 509/516/2509/2510/2516

far- Play Developers Manual

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

BACHELOR IN INFORMATION TECHNOLOGY (BIT) Term-End Examination December, 2011 CSI-01 : COMPUTER PLATFORMS

XCSP3 Competition 2018

On Filter Techniques for Generating Blue Noise Mask

1 Types of printer. U.S.T.H.B / C.E.I.L Unit 6 Computer science (L2) S2

RMT 2015 Power Round Solutions February 14, 2015

AN4507 Application note

Introduction to Real-Time Systems

UM2231 User manual. Teseo-LIV3F GNSS Module - Hardware Manual. Introduction

EFFICIENT IMPLEMENTATIONS OF OPERATIONS ON RUNLENGTH-REPRESENTED IMAGES

CSE6488: Mobile Computing Systems

On Filter Techniques for Generating Blue Noise Mask

will talk about Carry Look Ahead adder for speed improvement of multi-bit adder. Also, some people call it CLA Carry Look Ahead adder.

PUZZLES. Reasoning Ability TOP 50 QUESTIONS OF. IBPS RRB Prelims Exam Top 50 PUZZLES Questions For IBPS RRB Prelims 2018

EE ELECTRICAL ENGINEERING AND INSTRUMENTATION

UNIT-III LIFE-CYCLE PHASES

Leandro Chaves Rêgo. Unawareness in Extensive Form Games. Joint work with: Joseph Halpern (Cornell) Statistics Department, UFPE, Brazil.

Lecture 6: Electronics Beyond the Logic Switches Xufeng Kou School of Information Science and Technology ShanghaiTech University

Sat4j 2.3.2: on the fly solver configuration System Description

Assessing and. Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Bridging the Information Gap Between Buffer and Flash Translation Layer for Flash Memory

Reading. Lecture 17: MOS transistors digital. Context. Digital techniques:

ELECTRONICS ADVANCED SUPPLEMENTARY LEVEL

Avoiding the Problems

Informatics 2D: Tutorial 1 (Solutions)

EMI Modeling of a 32-bit Microcontroller in Wait Mode

Getting Started Guide

Mimics inprint 3.0. Release notes Beta

Crystal Technology, Inc.

AN AT89C52 MICROCONTROLLER BASED HIGH RESOLUTION PWM CONTROLLER FOR 3-PHASE VOLTAGE SOURCE INVERTERS

1 Permutations. 1.1 Example 1. Lisa Yan CS 109 Combinatorics. Lecture Notes #2 June 27, 2018

TIME- OPTIMAL CONVERGECAST IN SENSOR NETWORKS WITH MULTIPLE CHANNELS

Like Mobile Games* Currently a Distinguished i Engineer at Zynga, and CTO of FarmVille 2: Country Escape (for ios/android/kindle)

HAZARDS AND PULSE MODE SEQUENTIAL CIRCUITS

Power of Realtime 3D-Rendering. Raja Koduri

DESIGN OF GLOBAL SAW RFID TAG DEVICES C. S. Hartmann, P. Brown, and J. Bellamy RF SAW, Inc., 900 Alpha Drive Ste 400, Richardson, TX, U.S.A.

a. Disc Storage, RAM, Cache, CPU Registers b. CPU Registers, RAM, Disc Storage, Cache c. RAM, Disc Storage, CPU Registers, Cache

Globulation 2. Free software RTS game with a new take on micro-management

CS4617 Computer Architecture

Europe's cultural wealth at the click of a mouse: frequently asked questions

ACCELERATE SOFTWARE DEVELOPMENT WITH CONTINUOUS INTEGRATION AND SIMULATION

ENGLISH TRANSLATION. 79 GHz BAND HIGH-RESOLUTION RADAR ARIB STANDARD. ARIB STD-T111 Version 1.0. Version 1.0 December 18th 2012

FLoC/SAT 10 Edinburgh, Scotland, UK

Context Aware Computing

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

EDDY-CURRENT MODELING OF FERRITE-CORED PROBES

Metasys Zoning Package Commissioning

LOSSLESS CRYPTO-DATA HIDING IN MEDICAL IMAGES WITHOUT INCREASING THE ORIGINAL IMAGE SIZE THE METHOD

Advance Load Sharing System And Theft Detection System

Deadline scheduling: can your mobile device last longer?

ScienceDirect. Optimal Placement of RFID Antennas for Outdoor Applications

Introduction to CMOS VLSI Design (E158) Lecture 5: Logic

PaperCut VCA Cash Acceptor Manual

ZLS38503 Firmware for Voice Prompting and Messaging Firmware Manual

Transcription:

Controlling a Solver Execution: the runsolver Tool Olivier ROUSSEL CRIL - CNRS UMR 8188 roussel@cril.univ-artois.fr http://www.cril.univ-artois.fr/ roussel/runsolver/ Controlling a Solver Execution: the runsolver Tool 1

Outline The goal The main problem First attempts (2005) A better solution (2006 today) Impact on the solver Controlling a Solver Execution: the runsolver Tool 2

The goal When one is experimenting with a solver, it is useful to: limit the resources consumed by the solver time (obviously!) memory (to be detailed) cores allocated to the solver size of the output (solvers can be very, very verbose!)... collect some information on what happened during the run know at what time a solver printed a line interrupt the solver in a nice way, so that it s still able to provide useful information (e.g. an approximate answer)... and all this should come for free! runsolver is designed to fulfill these requirements, except the last one Controlling a Solver Execution: the runsolver Tool 3

Different times WC: wall clock time = real time that elapses between the start and the end of a computing task. CPU: CPU time = time during which instructions of the program are executed by a processing unit. Some remarks: On a host with 1 processing unit and no interrupts, CPU time=wc time On a host with 1 processing unit and a time sharing system, WC time CPU time On a host with n processing units, and for a perfect parallel program, CPU time=n WC time WC time= user s perception of the program efficiency CPU time= actual computational effort Controlling a Solver Execution: the runsolver Tool 4

Different memories RSS (Resident Size) amount of RAM occupied by the program VSIZE (Virtual Size) amount of memory (RAM or swap space) occupied by the program Some remarks: RSS is under the operating system control and can change arbitrarily during the solver execution. Not a candidate for enforcing a limit. VSIZE is under the program control (sum of program/library code + static data + dynamic memory allocations) VSIZE is the parameter to limit to prevent a solver from swapping Controlling a Solver Execution: the runsolver Tool 5

Swapping to disk Until we have solvers which are able to handle swap space in a clever way, it s a good idea to prevent the solver from swapping: magnetic disks are approximately 6 order of magnitude slower than main memory: the solver performances would be dominated by the disk performances too frequent swapping might kill the hardware As an example, due to a configuration error, one solver was actually allowed to swap in the competition. The host became unresponsive (no way to login) and kept swapping for 27 hours. Neither runsolver, nor torque (the batch system) were able to kill the job (were not even executed)! This policy should be revised once we have swap space on SSD devices. Controlling a Solver Execution: the runsolver Tool 6

Straightforward approach (limit cputime 1200 ; limit vmemoryuse 1G ; time solver instance.cnf) Easy approach for enforcing limits (except on WC time) Doesn t satisfy all our requirements (collecting information about the running solver for example) May print that the solver used 1 second CPU time and a total of 1200 seconds WC time!! May allow a solver with multiple processes to use much more than 1200 s CPU time!! Controlling a Solver Execution: the runsolver Tool 7

The source of the problem The CPU time of a process only includes the resources used by those of its children that have terminated and have been waited for (man 2 times). Consequence 1: if a parent process doesn t call wait(2), the resources used by the child will be forgotten. Consequence 2: ulimit/limit(1) cannot enforce reliable limits for multi-process solvers because the resources used by the child are only reported when it terminates (too late to enforce a limit!). Controlling a Solver Execution: the runsolver Tool 8

First attempt (2005) The idea: intercept memory allocation requests, in order to be able to gracefully terminate the solver when it requests too much memory intercept process creation calls to maintain a list of the solver processes Additional requirements: Solution: must also work for static binaries must not require any privilege run the solver in trace mode to intercept system calls Works, but severely degrades the solver performances! Controlling a Solver Execution: the runsolver Tool 9

Current solution (2006 today) Idea: periodically scan the list of processes to identify new children of the solver (once per second) periodically scan the list of the solver processes to update their CPU usage (cheaper, ten times per second) Advantages/Disavantages: works well low (but non nul) impact on the solver performances used in the PB/SAT competitions since 2006 as well as other competitions (ASP, MISC,...). cannot terminate the solver gracefully if it allocates too much memory in one call Controlling a Solver Execution: the runsolver Tool 10

Additional features timestamp each line printed by the solver (very useful) periodically save a list of the solver processes with the corresponding data from /proc (very useful for post analysis) limit the size of the solver output allocate a subset of the available cores to the solver and a few other options Controlling a Solver Execution: the runsolver Tool 11

Impact on the solver (1) In a perfect world ( 30 years ago) Execution unit Solver instructions Solver data Memory Controlling a Solver Execution: the runsolver Tool 12

Impact on the solver (2) In a perfect modern world Execution unit Solver instructions core 1 core 2 L1 L1 L2 main Solver data Memory Controlling a Solver Execution: the runsolver Tool 13

Impact on the solver (3) In a real world, under the control of runsolver Execution unit Solver instructions K R/K core 1 core 2 L1 K L1 R/K K L2 R/K main Solver data Memory runsolver, the kernel and the other processes running on the host are stealing CPU power and cache memory to the solver! Controlling a Solver Execution: the runsolver Tool 14

Impact on the solver (4) Any software tool will have an impact on the solver! runsolver attaches itself to the last core to limit its impact The competitions are a nice test-bed for runsolver: the CPU time used by runsolver is low ( 30 seconds CPU time for a run of 5000 s, less than 1 %) for sequential solvers, generally CPU time is equal to WC time (almost) for parallel solvers, evaluating the impact of runsolver is difficult because of the non-determinism of the solver and the sequential parts of the solvers (CPU/WC < number of CPU). Some parallel solvers in the competition achieved a ratio CPU/WC of 7.98 on a host with 8 cores, so the impact of runsolver is probably around 1%. Controlling a Solver Execution: the runsolver Tool 15

Conclusion runsolver offers a number of interesting features to control a solver It benefits from the experience gathered during various competitions runsolver is not perfect, but is just a pragmatic answer to the problem There is necessarily an interaction between the solver and runsolver (measuring modifies the experiment!) but the perturbation is limited (depends on the hardware and the solver). The balance benefits/disadvantages is positive (IMHO) Available under a GPL license at http://www.cril.univ-artois.fr/ roussel/runsolver The latest version used during this year competitions will be available soon. Controlling a Solver Execution: the runsolver Tool 16