SlideShare a Scribd company logo
© Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0
Hubert Zhang (hzhang@pivotal.io)
Jack WU (jwu@pivotal.io)
PL/Container
Introduction
Customize and Secure the Runtime and
Dependencies of Procedural Languages
Cover w/ Image
Agenda
■ The Problem
■ What is PL/Container
■ How to use PL/Container
■ PL/Container Internals
■ Future Work
■ Q+A
The Problem
PGConf 2018: PL/Container Introduction
We generate More and More Data

Recommended for you

Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example

Glusto is a framework for developing distributed system tests using Python. It combines commonly used tools like SSH, REST, and unit test frameworks into a single interface. Tests can be written using standard unittest or pytest formats and run from the command line. Glusto provides features like remote access, configuration handling, and test discovery/execution across multiple nodes defined in a YAML configuration file. The document provides instructions on installing Glusto and glustolibs-gluster, writing tests with Glusto features, and running tests via the Glusto CLI.

glusterfsgluster developer summit
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud

1) The document describes how to set up a Google Cloud virtual machine to use Prosit, a tool for peptide MS/MS and retention time prediction. It provides step-by-step instructions for installing the necessary software, downloading pre-trained Prosit models, and running examples. 2) Setup is estimated to take around 20 minutes. The document recommends using the cheapest GPU option (Tesla P100) as Prosit does not heavily utilize the GPU during prediction. At least 8 CPU cores and 100GB RAM are suggested. 3) Benchmarking showed that 100,000 peptides can be predicted in 10 minutes on a Tesla P100 VM, while 1 million peptides would take around 100 minutes.

prositproteomicscloud computing
On the benchmark of Chainer
On the benchmark of ChainerOn the benchmark of Chainer
On the benchmark of Chainer

This document discusses benchmarking deep learning frameworks like Chainer. It begins by defining benchmarks and their importance for framework developers and users. It then examines examples like convnet-benchmarks, which objectively compares frameworks on metrics like elapsed time. It discusses challenges in accurately measuring elapsed time for neural network functions, particularly those with both Python and GPU components. Finally, it introduces potential solutions like Chainer's Timer class and mentions the DeepMark benchmarks for broader comparisons.

machine learningdeep learning
We generate More and More Data
1.2
ZB 2.8ZB 8.5ZB
40ZB2010
2012
2015
20201ZB=1,000,000,000,000,000,000,000 Byte
We want to analyze data for knowledge
We want to analyse data IN Database
But…

Recommended for you

Hands On Gluster with Jeff Darcy
Hands On Gluster with Jeff DarcyHands On Gluster with Jeff Darcy
Hands On Gluster with Jeff Darcy

This document provides an agenda and overview for a Gluster tutorial presentation. It includes sections on Gluster basics, initial setup using test drives and VMs, extra Gluster features like snapshots and quota, and tips for maintenance and troubleshooting. Hands-on examples are provided to demonstrate creating a Gluster volume across two servers and mounting it as a filesystem. Terminology around bricks, translators, and the volume file are introduced.

glusterfshands on glustergluster tutorial
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...

Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.

dockerdocker.ioorchestration
Debugging node in prod
Debugging node in prodDebugging node in prod
Debugging node in prod

- The document discusses debugging Node.js applications in production environments at Netflix, which has strict uptime requirements. It describes techniques used such as collecting stack traces from running processes using perf and visualizing them in flame graphs to identify performance bottlenecks. It also covers configuring Node.js to dump core files on errors to enable post-mortem debugging without affecting uptime. The techniques help Netflix reduce latency, increase throughput, and fix runtime crashes and memory leaks in production Node.js applications.

netflixdebuggingpostmortem
PL/Python and PL/R are UNTRUSTED
Languages
Only Superuser can Create UDF in Untrusted
Languages
System(“rm -rf /data”)
The Problem: Triangle Dependency
Data Scientist
DBA
UDF
Review & Create
Run UDF
Greenplum
Package
UDFPackage
1. Greenplum
2. Operation System
3. Python / R
4. TensorFlow
Resolve The Problem: untrusted -> untrusted
Data Scientist
DBA
UDF
Review & Create
Run UDF
Create UDF

Recommended for you

Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farmKernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm

Building a full kernel takes time but is often necessary during development or when backporting patches. The nature of the kernel makes it easy to distribute its build on multiple cheap machines. This presentation will explain how to set up a build farm based on cost, size, and performance. Willy Tarreau, HaProxy

linuxkernel
Synchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with GstreamerSynchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with Gstreamer

The document discusses synchronizing media playback across multiple devices using GStreamer. It describes how GStreamer uses pipelines and clocks to synchronize playback. Specifically, it explains how to set up a pipeline to use a network clock shared between devices to synchronize the absolute time and running time, ensuring media plays at the same time on each device. Examples of implementing synchronized playback using playbin, gst-rtsp-server, and the Aurena project are also provided.

mediagstreamer
Arbiter volumes in gluster
Arbiter volumes in glusterArbiter volumes in gluster
Arbiter volumes in gluster

This document provides an introduction and overview of arbiter volumes in Gluster distributed file systems. It begins with background on Gluster and replicate (AFR) volumes. It then discusses how split-brains can occur in replica volumes and how client quorums help prevent this. The document introduces arbiter volumes as a way to provide the same consistency as 3-way replication while using less space. It explains how arbiter volumes are created and work, focusing on the arbitration logic and role of the arbiter brick. Brick sizing strategies and monitoring of arbiter volumes are also covered.

arbiterglusterfs
How to Make untrusted to untrusted?
PL/Container
PL/Container
What is PL/Container
PGConf 2018: PL/Container Introduction
What is PL/Container?
PL/Container is a customizable, secure
runtime for Greenplum Database Procedural
Languages.
● Greenplum Database Extension
● Stateless
● Based on Docker Container
● Customizable
● Secure
● Isolated
PL/Container
PL/Container
6.Ping
7.Ping
8.Call
9.SPI
10.Result
11.Result
PL/Container Architecture
GPDB Segment host
1. Query plan
2. Parse container
name from UDF body
3. Read configuration
4. Bring up container 5. Start
Repeat
p.8–p.11
12. Result Repeat p.12

Recommended for you

Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases

Slides presented at Percona Live Europe Open Source Database Conference 2019, Amsterdam, 2019-10-01. Imagine a world where all Wikipedia articles disappear due to a human error or software bug. Sounds unreal? According to some estimations, it would take an excess of hundreds of million person-hours to be written again. To prevent that scenario from ever happening, our SRE team at Wikimedia recently refactored the relational database recovery system. In this session, we will discuss how we backup 550TB of MariaDB data without impacting the 15 billion page views per month we get. We will cover what were our initial plans to replace the old infrastructure, how we achieved recovering 2TB databases in less than 30 minutes while maintaining per-table granularity, as well as the different types of backups we implemented. Lastly, we will talk about lessons learned, what went well, how our original plans changed and future work.

backupswikipediaperconalive
Clustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry piClustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry pi

This document discusses using Kubernetes to cluster Raspberry Pi devices running TensorFlow. It begins by introducing Kubernetes, TensorFlow, and the Raspberry Pi. It then covers setting up a Kubernetes cluster across multiple Raspberry Pis, including installing Docker, configuring the master and nodes, and deploying networking. Next, it discusses deploying TensorFlow jobs in a distributed manner across the Kubernetes cluster using strategies like in-graph replication. It also proposes using Docker images and Ansible scripts to simplify and automate the cluster setup. Finally, it outlines how the cluster could be used for applications involving hyperparameter tuning, scaling ML APIs, and ensemble/data parallelism with TensorFlow.

machine learningcloudkubernetes
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control

This document provides an introduction and overview of Java garbage collection (GC) tuning and the Java Mission Control tool. It begins with information about the speaker, Leon Chen, including his background and patents. It then outlines the Java and JVM roadmap and upcoming features. The bulk of the document discusses GC tuning concepts like heap sizing, generation sizing, footprint vs throughput vs latency. It provides examples and recommendations for GC logging, analysis tools like GCViewer and JWorks GC Web. The document is intended to outline Oracle's product direction and future plans for Java GC tuning and tools.

javajava mission controlgc
How UDF run in PL/Container?
PL/Container is a customizable, secure runtime
for Greenplum Database Procedural Languages.
a. PL/Container Extension starts a docker
container (only in 1st call)
b. Transfer UDF and data to docker container
c. Run the UDF in docker container
d. Contact the docker container to get the results
PL/Container
PL/Container
How to use PL/Container
PGConf 2018: PL/Container Introduction
Install PL/Container on Greenplum
Install from Source Code
● source $GPHOME/greenplum_path.sh
● make install
Install from GPPKG
● gppkg –i plcontianer-1.1.0-rhel7-x86_64.gppkg
● no additional dependencies
Platform
Centos 6.6+ or 7.x
Database
Greenplum 5.2+
Docker
Docker 17.05+ on Centos7
Docker 1.7+ on Centos6
Prerequisites
Build Custom Docker Image (optional)
Minimum Requirement:
● Python or R environment
● Add location of libpython.so and libR.so to LD_LIBRARY_PATH
Customize Your image:
● Install specific packages
FROM continuumio/anaconda
ENV LD_LIBRARY_PATH "/opt/conda/lib:$LD_LIBRARY_PATH”
FROM continuumio/anaconda3
RUN conda install -c conda-forge -y tensorflow
ENV LD_LIBRARY_PATH "/opt/conda/lib:/usr/local/lib:$LD_LIBRARY_PATH"

Recommended for you

How to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memoHow to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memo

How to Burn Multi-GPUs using CUDA stress test memo (2017/05/20) SAKURA Internet, Inc. / SAKURA Internet Research Center. Senior Researcher / Naoto MATSUMOTO

Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs

Slides used for an internal training. This explains how to generate Flame Graphs using Java Flight Recorder dumps. There is also an example to use Linux "perf_events" to generate a Java Mixed-Mode Flame Graph.

performanceperfflightrecorder
CRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux ContainersCRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux Containers

This talk describes CRIU (checkpoint/restore in userspace) software, used to checkpoint, restore, and live migrate Linux containers and processes. It describes the live migration, compares it to that of VM, and shows other uses for checkpoint/restore.

criulxclxd
runtime
<id>
<image>
<command>
<shared directory>
<setting
memory_mb>
<setting cpu_share>
runtime add
runtime delete
runtime backup
runtime restore
runtime edit
runtime show
image add
image delete
image list
Image RuntimeXML
Configure PL/Container
container cgroup node
memory.memsw.limit_in_bytes
cpu.shares
Run PL/Container
Running a simple plpython UDF to calculate log10
postgres=# CREATE LANGUAGE plpythonu; plcontainer;
postgres=# CREATE OR REPLACE FUNCTION pylog10(input double precision) RETURNS double
precision AS $$
import math
return math.log10(input)
$$ LANGUAGE plpythonu;
postgres=# SELECT pylog10(100);
pylog10
--------------
2
(1 row)
Run PL/Container
Running a simple PL/Container UDF to calculate log10
postgres=# CREATE EXTENSION plcontainer;
postgres=# CREATE OR REPLACE FUNCTION pylog10(Input double precision) RETURNS double
precision AS $$
# container: plc_python_shared
import math
return math.log10(input)
$$ LANGUAGE plcontainer;
postgres=# SELECT pylog10(100);
pylog10
--------------
2
(1 row)
Demos
How to use PLcontainer

Recommended for you

Introduction to RCU
Introduction to RCUIntroduction to RCU
Introduction to RCU

RCU (Read-Copy Update) is a technique for sharing data in memory across readers and writers without blocking. It allows for multiple concurrent readers that access shared data, while also allowing for writers to safely modify data without blocking readers. RCU has been widely adopted in the Linux kernel, with over 10,000 uses, helping it scale to large numbers of cores. RCU works by making copies of data that writers modify, and only making the new version visible to readers after all pre-existing readers have finished accessing the old data.

concurrencymultithreadingrcu
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU

This document discusses Linux containers and checkpoint/restore (C/R) functionality. It provides an overview of different types of virtualization including containers and virtual machines. It then focuses on C/R, describing how it allows saving and restoring process states. It outlines the history and key components of C/R, including how it works, interfaces it uses, and features supported in the Linux kernel to enable C/R. It also discusses testing and future plans for C/R.

lxclinuxcriu
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013

This document provides an overview of lightweight virtualization using Linux containers and Docker. It begins by explaining the problems of deploying applications across different environments and targets, and how containers can help solve this issue similarly to how shipping containers standardized cargo transportation. It then discusses what Linux containers are, how they provide isolation using namespaces and cgroups. It introduces Docker and how it builds on containers to further simplify deployment by allowing images to be easily built, shared, and run anywhere through standard formats and tools.

lxcdockervirtualization
PL/Container Internal
PGConf 2018: PL/Container Introduction
Cover w/ Image
PL/Container Internals
■ Message Protocol
■ SPI Support
■ Pluggable Backend
■ Resource Management
■ Error Handling
■ Performance
Message Protocol
PL/Container use messages to
communicate between QEs and
containers.
● plcMsgPing
● plcMsgCallreq
● plcMsgResult
● plcMsgError
● plcMsgLog
● plcMsgSQL
● plcMsgSubtransaction
● plcMsgRaw
Query
Executor
Container
PING PONG SQLResultSQLError/LogCallReq
Result
SPI support
Server Programming Interface enable UDF to run SQL queries.
Query ExecutorContainer
plpy.execute(query)
plan=plpy.prepare
plpy.execute(plan)
SPI_execute()
create&cache plan
SPI_execute_plan
Where
Query
Generated
Where
Query
Executed
Problem: SPI is called inside container but executed at QE side.

Recommended for you

Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013

Docker provides a standardized way to build, ship, and run Linux containers. It uses Linux kernel features like namespaces and cgroups to isolate containers and make them lightweight. Docker allows building container images using Dockerfiles and sharing them via public or private registries. Images can be pulled and run anywhere. Docker aims to make containers easy to use and commoditize the container technology provided by Linux containers (LXC).

[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive

- containerd overview - Upcoming features in v1.4 - External plugins https://kccnceu20.sched.com/event/ZexS/containerd-deep-dive-akihiro-suda-ntt-wei-fu-alibaba

containerdkubeconkubernetes
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin

PGConf.ASIA 2019 Bali - 10 September 2019 Speaker: Alexander Kukushkin Room: ACID Title: PostgreSQL on K8S at Zalando: Two+ Years in Production

postgresqlconferenceasia
Pluggable Backend
Docker as a sandbox Container as a serviceSeparate Process
GPDB Query Executor
C CODE
Python Executor
Python Code
Resource Management
Container level
● Memory: memory limit, minimum is 4M
● CpuShares: relative weight of CPU
Extension level
● Integrated with GPDB resource group extension
framework.
OOM
Container level
● Memory: memory limit, minimum is 4M
● CpuShares: relative weight of CPU
Extension level
● Integrated with GPDB resource group extension
framework.
create resource group plgroup
(concurrency=0,
cpu_rate_limit=10,
memory_limit=30,
memory_auditor=‘cgroup’)
Resource Management
OOM
Resource Management
Container level
● Memory: memory limit, minimum is 4M
● CpuShares: relative weight of CPU
Extension level
● Integrated with GPDB resource group extension
framework.
memory
gpdb
default_grou
p OID
plgroup oid
aefs9err8e flkr345ere4
cgroup
38G
1G 2G
create resource group plgroup
(concurrency=0,
cpu_rate_limit=10,
memory_limit=30,
memory_auditor=‘cgroup’)

Recommended for you

"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...

Lightweight virtualization", also called "OS-level virtualization", is not new. On Linux it evolved from VServer to OpenVZ, and, more recently, to Linux Containers (LXC). It is not Linux-specific; on FreeBSD it's called "Jails", while on Solaris it’s "Zones". Some of those have been available for a decade and are widely used to provide VPS (Virtual Private Servers), cheaper alternatives to virtual machines or physical servers. But containers have other purposes and are increasingly popular as the core components of public and private Platform-as-a-Service (PAAS), among others. Just like a virtual machine, a Linux Container can run (almost) anywhere. But containers have many advantages over VMs: they are lightweight and easier to manage. After operating a large-scale PAAS for a few years, dotCloud realized that with those advantages, containers could become the perfect format for software delivery, since that is how dotCloud delivers from their build system to their hosts. To make it happen everywhere, dotCloud open-sourced Docker, the next generation of the containers engine powering its PAAS. Docker has been extremely successful so far, being adopted by many projects in various fields: PAAS, of course, but also continuous integration, testing, and more.

Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins

This document summarizes Noah Watkins' presentation on building a distributed shared log using Ceph. The key points are: 1) Noah discusses how shared logs are challenging to scale due to the need to funnel all writes through a total ordering engine. This bottlenecks performance. 2) CORFU is introduced as a shared log design that decouples I/O from ordering by striping the log across flash devices and using a sequencer to assign positions. 3) Noah then explains how the components of CORFU can be mapped onto Ceph, using RADOS object classes, librados, and striping policies to implement the shared log without requiring custom hardware interfaces. 4) ZLog is presented

cephcephalocon apac 2018cephalocon
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)

In this presentation I talk about our motivation to converting our microservices to run on Kubernetes. I discuss many of the technical challenges we encountered along the way, including networking issues, Java issues, monitoring and alerting, and managing all of our resources!

kubernetessquarespacecontainers
Error Handling
Container failure should not affect GPDB core
● Containers fail to create
● Containers fail to start
● Containers crash when running
● Cached containers crash
Container cleanup
● Query Cancel
● QE error
● Cached QE quit when idle for a long time (By Cleanup process)
Performance
Optimization
● Cached container (lifecycle same as QE)
● Unix domain socket
● Type conversion
● Resource management (CPU share)
Best practices
● Array instead of multiple rows.
● Complex UDF instead of simple one
QE Container
start container
tuple 1
tuple 2
query 1
query 2
tuple 1
tuple n
tuple n
.
.
.
.
.
Performance
Test Environment
● Hardware: 6 virtual machines, each with 19G memory and 5 processors. (Intel(R)
Xeon(R) CPU E5-2697 v2 @ 2.70GHz)
● Software: Centos7, GPDB 5.2 with 30 segments.
Workloads
● Long-running function
● Large input array function
● Large output array function
Performance
Long-running function
CREATE OR REPLACE FUNCTION pysleep(i
int) RETURNS void AS $$
# contaziner: plc_python_shared
import time
time.sleep(i)
$$ LANGUAGE plcontainer;
SELECT count(pysleep(1)) FROM tbl;
no performance downgrade

Recommended for you

Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire

This document provides an introduction and overview of Docker and containers. It discusses that Docker is an open source tool that allows applications to be packaged with all their dependencies and run as isolated processes on any machine. Containers provide lightweight virtualization that improves efficiency by sharing resources but still isolating processes. The document outlines how Docker uses containers powered by Linux namespaces and cgroups to package and deploy applications easily and consistently across environments.

docker.ioguidewiredeveloper
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA

This document provides a summary of a presentation on becoming an accidental PostgreSQL database administrator (DBA). It covers topics like installation, configuration, connections, backups, monitoring, slow queries, and getting help. The presentation aims to help those suddenly tasked with DBA responsibilities to not panic and provides practical advice on managing a PostgreSQL database.

Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU

It’s important to be able to figure out what’s going on when things go wrong in your Node.js production application. Tools are needed to investigate memory leaks, crashes and other "interesting" events in production. The post-mortem community working group (https://github.com/nodejs/post-mortem) is working on these problems. Come and learn about the key issues being worked, and the progress of the working group so far as illustrated through examples and code.

nodereportpost-mortemproblem determination
Performance
Large input array function
CREATE OR REPLACE FUNCTION
pylargeint8in(a int8[]) RETURNS float8
AS $$
#container : plc_python_shared
return sum(a)/float(len(a))
$$ LANGUAGE plcontainer;
SELECT count(pylargeint8in(ARRAY(SELECT
column1 FROM tbl1))) FROM tbl2;
2 times performance downgrade for Python
30% performance improvement for R
Performance
Large output array function
CREATE OR REPLACE FUNCTION
pylargeoutfloat8(num int) RETURNS
float8[] AS $$
# container: plc_python_shared
return [x/3.0 for x in range(num)]
$$ LANGUAGE plcontainer;
SELECT count(pylargeoutfloat8(n)) FROM
tbl;
4 times performance improvement
Future Work
PGConf 2018: PL/Container Introduction
PL/Container Future Work (subject to change)
Support More Languages Support More TechnologyContainer Orchestrater /
Cloud

Recommended for you

Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs

Historically, sharing a Linux server entailed all kinds of untenable compromises. In addition to the security concerns, there was simply no good way to keep one application from hogging resources and messing with the others. The classic “noisy neighbor” problem made shared systems the bargain-basement slums of the Internet, suitable only for small or throwaway projects. Serious use-cases traditionally demanded dedicated systems. Over the past decade virtualization (in conjunction with Moore’s law) has democratized the availability of what amount to dedicated systems, and the result is hundreds of thousands of websites and applications deployed into VPS or cloud instances. It’s a step in the right direction, but still has glaring flaws. Most of these websites are just piles of code sitting on a server somewhere. How did that code got there? How can it can be scaled? Secured? Maintained? It’s anybody’s guess. There simply isn’t enough SysAdmin talent in the world to meet the demands of managing all these apps with anything close to best practices without a better model. Containers are a whole new ballgame. Unlike VMs, you skip the overhead of running an entire OS for every application environment. There’s also no need to provision a whole new machine to have a place to deploy, meaning you can spin up or scale your application with orders of magnitude more speed and accuracy.

linuxcontainerscgroups
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101

This document provides an overview of Kubernetes 101. It begins with asking why Kubernetes is needed and provides a brief history of the project. It describes containers and container orchestration tools. It then covers the main components of Kubernetes architecture including pods, replica sets, deployments, services, and ingress. It provides examples of common Kubernetes manifest files and discusses basic Kubernetes primitives. It concludes with discussing DevOps practices after adopting Kubernetes and potential next steps to learn more advanced Kubernetes topics.

k8skubernetes
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x

This document discusses Docker and containers. It begins with an introduction to Docker and the container model. It explains that containers provide isolation using namespaces and cgroups. Containers deploy applications efficiently by sharing resources and deploying anywhere due to standardization. The document then covers building images with Dockerfiles for reproducible builds. It concludes by discussing Docker's future including networking, metrics, logging, plugins and orchestration.

https://github.com/greenplum-db/plcontainer
https://gpdb.docs.pivotal.io/570/ref_guide/extensions/pl_container.html
Transforming How The World Builds Software
© Copyright 2017 Pivotal Software, Inc. All rights Reserved.

More Related Content

What's hot

GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
PostgreSQL Experts, Inc.
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
Yuji Kubota
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
C4Media
 
Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example
Gluster.org
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
UC Davis
 
On the benchmark of Chainer
On the benchmark of ChainerOn the benchmark of Chainer
On the benchmark of Chainer
Kenta Oono
 
Hands On Gluster with Jeff Darcy
Hands On Gluster with Jeff DarcyHands On Gluster with Jeff Darcy
Hands On Gluster with Jeff Darcy
Gluster.org
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
dotCloud
 
Debugging node in prod
Debugging node in prodDebugging node in prod
Debugging node in prod
Yunong Xiao
 
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farmKernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Anne Nicolas
 
Synchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with GstreamerSynchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with Gstreamer
Samsung Open Source Group
 
Arbiter volumes in gluster
Arbiter volumes in glusterArbiter volumes in gluster
Arbiter volumes in gluster
itisravi
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
Jaime Crespo
 
Clustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry piClustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry pi
Andrés Leonardo Martinez Ortiz
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
Leon Chen
 
How to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memoHow to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memo
Naoto MATSUMOTO
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs
Isuru Perera
 
CRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux ContainersCRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux Containers
Kirill Kolyshkin
 
Introduction to RCU
Introduction to RCUIntroduction to RCU
Introduction to RCU
Kernel TLV
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU
Andrey Vagin
 

What's hot (20)

GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 
Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
 
On the benchmark of Chainer
On the benchmark of ChainerOn the benchmark of Chainer
On the benchmark of Chainer
 
Hands On Gluster with Jeff Darcy
Hands On Gluster with Jeff DarcyHands On Gluster with Jeff Darcy
Hands On Gluster with Jeff Darcy
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
 
Debugging node in prod
Debugging node in prodDebugging node in prod
Debugging node in prod
 
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farmKernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
 
Synchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with GstreamerSynchronised Multidevice Media Playback with Gstreamer
Synchronised Multidevice Media Playback with Gstreamer
 
Arbiter volumes in gluster
Arbiter volumes in glusterArbiter volumes in gluster
Arbiter volumes in gluster
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
Clustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry piClustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry pi
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
 
How to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memoHow to Burn Multi-GPUs using CUDA stress test memo
How to Burn Multi-GPUs using CUDA stress test memo
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs
 
CRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux ContainersCRIU: Time and Space Travel for Linux Containers
CRIU: Time and Space Travel for Linux Containers
 
Introduction to RCU
Introduction to RCUIntroduction to RCU
Introduction to RCU
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU
 

Similar to Customize and Secure the Runtime and Dependencies of Your Procedural Languages Using PL/Container - Greenplum Summit 2018

Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
Akihiro Suda
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
Equnix Business Solutions
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Yandex
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
Ceph Community
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kevin Lynch
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
PostgreSQL Experts, Inc.
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU
Michael Dawson
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
David Timothy Strauss
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Stanislav Pogrebnyak
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
Peter Griffin
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
Stanislav Osipov
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linux
Pavel Klimiankou
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Citus Data
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
kanedafromparis
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computing
Arjan Lamers
 

Similar to Customize and Secure the Runtime and Dependencies of Your Procedural Languages Using PL/Container - Greenplum Summit 2018 (20)

Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linux
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computing
 

More from VMware Tanzu

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 

More from VMware Tanzu (20)

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 

Recently uploaded

COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
Hironori Washizaki
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
Roshan Dwivedi
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
bhatinidhi2001
 
Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
Task Tracker
 
active-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptxactive-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptx
sudsdeep
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Asher Sterkin
 
Leading Project Management Tool Taskruop.pptx
Leading Project Management Tool Taskruop.pptxLeading Project Management Tool Taskruop.pptx
Leading Project Management Tool Taskruop.pptx
taskroupseo
 
dachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdfdachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdf
DNUG e.V.
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
avufu
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
DNUG e.V.
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
Ortus Solutions, Corp
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
sachin chaurasia
 
ENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentationENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentation
sofiafernandezon
 
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
Semiosis Software Private Limited
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
VishrutGoyani1
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
908dutch
 
Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
Ortus Solutions, Corp
 

Recently uploaded (20)

COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
 
Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
 
active-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptxactive-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptx
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
 
Leading Project Management Tool Taskruop.pptx
Leading Project Management Tool Taskruop.pptxLeading Project Management Tool Taskruop.pptx
Leading Project Management Tool Taskruop.pptx
 
dachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdfdachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdf
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
 
ENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentationENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentation
 
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
 
Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
 

Customize and Secure the Runtime and Dependencies of Your Procedural Languages Using PL/Container - Greenplum Summit 2018

  • 1. © Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0 Hubert Zhang (hzhang@pivotal.io) Jack WU (jwu@pivotal.io) PL/Container Introduction Customize and Secure the Runtime and Dependencies of Procedural Languages
  • 2. Cover w/ Image Agenda ■ The Problem ■ What is PL/Container ■ How to use PL/Container ■ PL/Container Internals ■ Future Work ■ Q+A
  • 3. The Problem PGConf 2018: PL/Container Introduction
  • 4. We generate More and More Data
  • 5. We generate More and More Data 1.2 ZB 2.8ZB 8.5ZB 40ZB2010 2012 2015 20201ZB=1,000,000,000,000,000,000,000 Byte
  • 6. We want to analyze data for knowledge
  • 7. We want to analyse data IN Database
  • 9. PL/Python and PL/R are UNTRUSTED Languages
  • 10. Only Superuser can Create UDF in Untrusted Languages System(“rm -rf /data”)
  • 11. The Problem: Triangle Dependency Data Scientist DBA UDF Review & Create Run UDF Greenplum Package UDFPackage 1. Greenplum 2. Operation System 3. Python / R 4. TensorFlow
  • 12. Resolve The Problem: untrusted -> untrusted Data Scientist DBA UDF Review & Create Run UDF Create UDF
  • 13. How to Make untrusted to untrusted? PL/Container PL/Container
  • 14. What is PL/Container PGConf 2018: PL/Container Introduction
  • 15. What is PL/Container? PL/Container is a customizable, secure runtime for Greenplum Database Procedural Languages. ● Greenplum Database Extension ● Stateless ● Based on Docker Container ● Customizable ● Secure ● Isolated PL/Container PL/Container
  • 16. 6.Ping 7.Ping 8.Call 9.SPI 10.Result 11.Result PL/Container Architecture GPDB Segment host 1. Query plan 2. Parse container name from UDF body 3. Read configuration 4. Bring up container 5. Start Repeat p.8–p.11 12. Result Repeat p.12
  • 17. How UDF run in PL/Container? PL/Container is a customizable, secure runtime for Greenplum Database Procedural Languages. a. PL/Container Extension starts a docker container (only in 1st call) b. Transfer UDF and data to docker container c. Run the UDF in docker container d. Contact the docker container to get the results PL/Container PL/Container
  • 18. How to use PL/Container PGConf 2018: PL/Container Introduction
  • 19. Install PL/Container on Greenplum Install from Source Code ● source $GPHOME/greenplum_path.sh ● make install Install from GPPKG ● gppkg –i plcontianer-1.1.0-rhel7-x86_64.gppkg ● no additional dependencies Platform Centos 6.6+ or 7.x Database Greenplum 5.2+ Docker Docker 17.05+ on Centos7 Docker 1.7+ on Centos6 Prerequisites
  • 20. Build Custom Docker Image (optional) Minimum Requirement: ● Python or R environment ● Add location of libpython.so and libR.so to LD_LIBRARY_PATH Customize Your image: ● Install specific packages FROM continuumio/anaconda ENV LD_LIBRARY_PATH "/opt/conda/lib:$LD_LIBRARY_PATH” FROM continuumio/anaconda3 RUN conda install -c conda-forge -y tensorflow ENV LD_LIBRARY_PATH "/opt/conda/lib:/usr/local/lib:$LD_LIBRARY_PATH"
  • 21. runtime <id> <image> <command> <shared directory> <setting memory_mb> <setting cpu_share> runtime add runtime delete runtime backup runtime restore runtime edit runtime show image add image delete image list Image RuntimeXML Configure PL/Container container cgroup node memory.memsw.limit_in_bytes cpu.shares
  • 22. Run PL/Container Running a simple plpython UDF to calculate log10 postgres=# CREATE LANGUAGE plpythonu; plcontainer; postgres=# CREATE OR REPLACE FUNCTION pylog10(input double precision) RETURNS double precision AS $$ import math return math.log10(input) $$ LANGUAGE plpythonu; postgres=# SELECT pylog10(100); pylog10 -------------- 2 (1 row)
  • 23. Run PL/Container Running a simple PL/Container UDF to calculate log10 postgres=# CREATE EXTENSION plcontainer; postgres=# CREATE OR REPLACE FUNCTION pylog10(Input double precision) RETURNS double precision AS $$ # container: plc_python_shared import math return math.log10(input) $$ LANGUAGE plcontainer; postgres=# SELECT pylog10(100); pylog10 -------------- 2 (1 row)
  • 24. Demos How to use PLcontainer
  • 25. PL/Container Internal PGConf 2018: PL/Container Introduction
  • 26. Cover w/ Image PL/Container Internals ■ Message Protocol ■ SPI Support ■ Pluggable Backend ■ Resource Management ■ Error Handling ■ Performance
  • 27. Message Protocol PL/Container use messages to communicate between QEs and containers. ● plcMsgPing ● plcMsgCallreq ● plcMsgResult ● plcMsgError ● plcMsgLog ● plcMsgSQL ● plcMsgSubtransaction ● plcMsgRaw Query Executor Container PING PONG SQLResultSQLError/LogCallReq Result
  • 28. SPI support Server Programming Interface enable UDF to run SQL queries. Query ExecutorContainer plpy.execute(query) plan=plpy.prepare plpy.execute(plan) SPI_execute() create&cache plan SPI_execute_plan Where Query Generated Where Query Executed Problem: SPI is called inside container but executed at QE side.
  • 29. Pluggable Backend Docker as a sandbox Container as a serviceSeparate Process GPDB Query Executor C CODE Python Executor Python Code
  • 30. Resource Management Container level ● Memory: memory limit, minimum is 4M ● CpuShares: relative weight of CPU Extension level ● Integrated with GPDB resource group extension framework. OOM
  • 31. Container level ● Memory: memory limit, minimum is 4M ● CpuShares: relative weight of CPU Extension level ● Integrated with GPDB resource group extension framework. create resource group plgroup (concurrency=0, cpu_rate_limit=10, memory_limit=30, memory_auditor=‘cgroup’) Resource Management OOM
  • 32. Resource Management Container level ● Memory: memory limit, minimum is 4M ● CpuShares: relative weight of CPU Extension level ● Integrated with GPDB resource group extension framework. memory gpdb default_grou p OID plgroup oid aefs9err8e flkr345ere4 cgroup 38G 1G 2G create resource group plgroup (concurrency=0, cpu_rate_limit=10, memory_limit=30, memory_auditor=‘cgroup’)
  • 33. Error Handling Container failure should not affect GPDB core ● Containers fail to create ● Containers fail to start ● Containers crash when running ● Cached containers crash Container cleanup ● Query Cancel ● QE error ● Cached QE quit when idle for a long time (By Cleanup process)
  • 34. Performance Optimization ● Cached container (lifecycle same as QE) ● Unix domain socket ● Type conversion ● Resource management (CPU share) Best practices ● Array instead of multiple rows. ● Complex UDF instead of simple one QE Container start container tuple 1 tuple 2 query 1 query 2 tuple 1 tuple n tuple n . . . . .
  • 35. Performance Test Environment ● Hardware: 6 virtual machines, each with 19G memory and 5 processors. (Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz) ● Software: Centos7, GPDB 5.2 with 30 segments. Workloads ● Long-running function ● Large input array function ● Large output array function
  • 36. Performance Long-running function CREATE OR REPLACE FUNCTION pysleep(i int) RETURNS void AS $$ # contaziner: plc_python_shared import time time.sleep(i) $$ LANGUAGE plcontainer; SELECT count(pysleep(1)) FROM tbl; no performance downgrade
  • 37. Performance Large input array function CREATE OR REPLACE FUNCTION pylargeint8in(a int8[]) RETURNS float8 AS $$ #container : plc_python_shared return sum(a)/float(len(a)) $$ LANGUAGE plcontainer; SELECT count(pylargeint8in(ARRAY(SELECT column1 FROM tbl1))) FROM tbl2; 2 times performance downgrade for Python 30% performance improvement for R
  • 38. Performance Large output array function CREATE OR REPLACE FUNCTION pylargeoutfloat8(num int) RETURNS float8[] AS $$ # container: plc_python_shared return [x/3.0 for x in range(num)] $$ LANGUAGE plcontainer; SELECT count(pylargeoutfloat8(n)) FROM tbl; 4 times performance improvement
  • 39. Future Work PGConf 2018: PL/Container Introduction
  • 40. PL/Container Future Work (subject to change) Support More Languages Support More TechnologyContainer Orchestrater / Cloud
  • 42. Transforming How The World Builds Software © Copyright 2017 Pivotal Software, Inc. All rights Reserved.