C M P 3 1 9 - R Deploy graphics desktops for content production on AWS
Mike Owen Mark Stephens Principal Solutions Architect Partner Solutions Architect AWS Thinkbox Amazon Web Services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda
Overview: Elastic Graphics, Amazon AppStream 2.0, Amazon WorkSpaces, Unmanaged G4
Workshop 1: Amazon AppStream 2.0
Workshop 2: Amazon WorkSpaces
Workshop 3: Unmanaged G4
Summary, Questions Related breakouts Chalk talks EUC334 – Give students access to applications for class through any computer (diving into Cornell University‘s journey) EUC330 – Migrating your Windows 7 desktops to Windows 10 with Amazon WorkSpaces ENT314 – Securely manage and stream your desktop applications (diving into GE Power‘s journey) WPS314 – Amazon WorkSpaces for Regulated Industries ENT316 – Well Architected WorkSpaces: Enterprise Deployment at Scale Workshops EUC301 – Get up and running with Amazon Linux WorkSpaces EUC303 – Build an Amazon AppStream 2.0 environment to stream desktop apps Builders EUC307 – Amazon WorkSpaces Disaster Recovery Best Practices EUC321 – Getting started with Amazon WorkSpaces Linux EUC323 – Managing Amazon WorkSpaces by integrating AWS Service Catalog with ServiceNow EUC318 – Create a SaaS portal for your desktop application with Amazon AppStream 2.0 EUC310 – Enhance your Amazon AppStream 2.0 environments: branding, automation, and other cost savings techniques EUC313 – Scaling your Amazon AppStream 2.0 Environment EUC326 – Visualize and analyze your Amazon AppStream 2.0 usage EUC319 – Customize your Amazon AppStream 2.0 environment with session scripts Amazon Elastic Graphics
Easily and cost-effectively add graphics acceleration to Amazon EC2 Instances • Attach low-cost graphics acceleration to EC2 instances • 1-8GB of OpenGL memory • Windows 2012 R2 or later only • OpenGL 4.3/GL Shader Language 4.30 • Compatible with DCV, PCoIP, RDP, VNC
• Ideal for: • a small amount of GPU for graphics acceleration, or • applications that could benefit from some GPU, but also require high amounts of compute, memory, or storage
Elastic Graphics Accelerator Size Graphics Memory Price eg1.medium 1 GiB $0.050/hour eg1.large 2 GiB $0.100/hour eg1.xlarge 4 GiB $0.200/hour eg1.2xlarge 8 GiB $0.400/hour
*Prices shown are for the US East (N. Virginia) AWS Region AppStream 2.0
Fully managed application streaming service that provides users instant access to their desktop applications
Import existing Windows apps with no changes or rewrites and start streaming Integrates with existing apps, identity, storage, and network No infrastructure to install or manage Consistent performance - one streaming instance per user Dual monitors, USB, keyboard shortcuts through local Windows client Standard, Compute, Memory, Graphics Design, Graphics Pro – OpenGL, OpenCL, DirectX, CUDA(Pro)
User
User Administrator Image Builder Image Assistant Define a Fleet Provision a Stack Used to install Used to define Configurations Configurations and configure and optimize include image, include Fleet, user Business Apps presented, instance types, storage, access Applications configure default networking, permission User user settings and scaling options User Pools create an image configurations and customer Used to define branding users and grant stack access Amazon WorkSpaces Access your desktop anywhere, anytime, from any device
Secure cloud desktops Simple to deploy and manage
Pay-as-you-go Scalable and performant
GPU SSD ROOT SSD BUNDLES vCPU RAM GPU/MODEL CUDA WINDOWS LINUX EC2 TYPE MEM VOLUME USER VOLUME
Value 1 2 - - - 80GB 10GB Win2008R2/2016 AL2 internal
Standard 2 4 - - - 80GB 50GB Win2008R2/2016 AL2 internal
Performance 2 7.5 - - - 80GB 100GB Win2008R2/2016 AL2 internal
Power 4 16 - - - 175GB 100GB Win2008R2/2016 AL2 internal
PowerPro 8 32 - - - 175GB 100GB Win2008R2/2016 AL2 internal
Graphics 8 15 NVIDIA 4 1536 100GB 100GB Win2008R2/2016 - internal
GraphicsPro 16 122 NVIDIA M60 8 2048 100GB 100GB Win2016 - g3.4xlarge Unmanaged G4 IaaS custom desktop experience for highest graphics fidelity
Amazon EC2 NVIDIA GPU instances G OD OD GPU NVIDIA GPU Tensor RT Instance NVMe Network INSTANCE P vCPU RAM CUDA price/hr price/hr MEM GPU - GB P2P Cores Cores Storage Performance U (Linux)* (Win)*
g3s.xlarge 1 4 30.5 8 2048 M60-8 - - - EBS-Only Up to 10 Gbps $0.75 $0.93
g3.4xlarge 1 16 122 8 2048 M60-8 - - - EBS-Only Up to 10 Gbps $1.14 $1.876
g3.8xlarge 2 32 244 16 4096 M60-8 - - - EBS-Only 10 Gbps $2.28 $3.752
g3.16xlarge 4 64 488 32 8192 M60-8 - - - EBS-Only 25 Gbps $4.56 $7.504
g4dn.xlarge 1 4 16 16 2560 T4-16 - 320 40 125GB Up to 25 Gbps $0.52 $0.71
g4dn.2xlarge 1 8 32 16 2560 T4-16 - 320 40 225GB Up to 25 Gbps $0.75 $1.12
g4dn.4xlarge 1 16 64 16 2560 T4-16 - 320 40 225GB Up to 25 Gbps $1.20 $1.94
g4dn.8xlarge 1 32 128 16 2560 T4-16 - 320 40 1x900GB 50 Gbps $2.17 $3.64
g4dn.16xlarge 1 64 256 16 2560 T4-16 - 320 40 1x900GB 50 Gbps $4.35 $7.29
g4dn.12xlarge 4 48 192 64 10,240 T4-16 - 1280 160 1x900GB 50 Gbps $3.91 $6.12
g4dn.metal 8 96 384 128 20,480 T4-16 - 2560 320 2x900GB 100 Gbps - -
p3.2xlarge 1 8 61 16 5120 V100-16 - 640 - EBS-Only Up to 10 Gbps $3.06 $3.42
p3.8xlarge 4 32 244 64 20,480 V100-16 NVLink 2560 - EBS-Only 10 Gbps $12.24 $13.71
p3.16xlarge 8 64 488 28 40,960 V100-16 NVLink 5120 - EBS-Only 25 Gbps $24.48 $27.42
p3dn.24xlarge 8 96 768 256 40,960 V100-32 NVLink 5120 - 2x900GB 100 Gbps $31.21 $35.62 *Prices shown are for the US East (N. Virginia) AWS Region
AWS workshop portal bit.ly/37KONLG © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. amzn.to/2QZfJBz
# Sign out of any AWS Management Console/account you may already be logged into on your laptop # Open your local browser and go to:
# Upload a Blender file from your laptop (downloaded from the credentials portal
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. # Download and install Amazon WorkSpaces client for your laptop OS: https://clients.amazonworkspaces.com/
# (If you have an existing WorkSpaces client; use “Options” -> “Manage Registrations” to add another one) # Enter:
# Use VLC player and play the video files from the
# Use Chrome -> visit YouTube.com and watch a video[with audio] of your choice in FULL- SCREEN and then ½ size, then ¼ size on your screen. Observe audio-video sync
# Run MS “Paint” and draw/paint some art! # Test latency using mouse/touchpad on your laptop. Is there cursor lag?
# Open 3D scene files in Blender application (3D files in
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Teradici s/w client
# Download and install Teradici “Software Client for
Windows: https://docs.teradici.com/find/product/cloud-access-software/2019.11/software-client-for-windows macOS: https://docs.teradici.com/find/product/cloud-access-software/2019.11/software-client-for-macos Linux: https://docs.teradici.com/find/product/cloud-access-software/2019.11/software-client-for-linux
# Login to G4 instance with Teradici s/w client
Host Address or Code: ADDRESS OF EC2 HOST Connection Name: linux
Click: NEXT Teradici s/w client
# Click: “Connect Insecurely” Linux: Teradici s/w client
# Enter: centos
# Enter:
# check pcoip-agent logs $ sudo tail -f /var/log/pcoip-agent/server.centos.log
# check version of pcoip-agent-graphics and apply any update if available $ sudo yum list pcoip-agent-graphics $ sudo yum update pcoip-agent-graphics -y
# find the man page for pcoip and look for additional settings # hint: add a ‘.conf’
# check driver installed $ nvidia-smi -q | head
# G4dn/Nvidia optimization settings # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/optimize_gpu.html # Question: Select from the above URL the correct “optimize GPU settings” and apply them to your workstation # Answer: https://pastecode.xyz/view/32ec0479 Linux: VLC player, Krita, Blender # install VLC player $ sudo yum install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm $ sudo yum install vlc -y
# download video files from S3 and play with VLC player $ aws s3 cp s3://cmp319-assets/videos/ . # VLC -> “Video” -> “Full-Screen” # VLC -> “Window” -> “Media Information…” – investigate “Codec Details” & “Statistics”
# visit YouTube.com and watch a video [with audio] of your choice in FULL-SCREEN and then ½ size, then ¼ size on your screen. Observe audio-video sync
# install Krita, make art! Test latency using mouse/touchpad on your laptop. Is there cursor lag? $ sudo yum install calligra-krita -y
# install blender $ aws s3 cp s3://cmp319-assets/installers/blender-2.81-linux-glibc217-x86_64.tar.bz2 . $ tar xvf blender-2.81-linux-glibc217-x86_64.tar.bz2 $ cd blender-2.81-linux-glibc217-x86_64 $ ./blender
# download blender 3D scene file $ aws s3 cp s3://cmp319-assets/blender/.
# open scene files in Blender and test interactivity levels. Is it usable? Use 3D tools/orbit the models Linux: X11 tweaks for dual monitors
# optimize X11 for dual-monitor setup for production use $ sudo nvidia-xconfig $ sudo vim /etc/X11/xorg.conf # [press “i” to then PASTE the text below and then press “ESC” followed by “:wq!” to save the file and exit]
# add line below to “Screen” section in above xorg.conf file Section "Screen" Option "FlatPanelProperties" "Dithering=Disabled" EndSection
# add everything below as a new section into the above xorg.conf file Section "Extensions" Option "Composite" "Disable" EndSection Linux: Fast-repeats, debugging, stats monitoring
# enable host keyboard auto-repeating, verbose stats logging, display FPS on monitor # add following YELLOW lines to the PCoIP .conf file $ sudo vim /etc/pcoip-agent/pcoip-agent.conf # [press “i” to then PASTE the text below and then press “ESC” followed by “:wq!” to save the file and exit] pcoip.use_host_autorepeat = 1 pcoip.enable_perf_mon = 1 pcoip.server_statistics_interval_seconds = 10 pcoip.fps_indicator = 2
# exit Teradici PCoIP session by closing desktop window and logging back in again to start a new Teradici session
# Use Blender, Krita, VLC and observe your FPS indicator values as a result of using each application. # Record your result for each application [Blender: ?fps, Krita: ?fps, VLC: ?fps] Linux: OpenGL smoke test, stats monitoring
# OpenGL Smoke Test – run glxgears and resize the window to different sizes, are the gears rotating smoothly ALL the time? What is the NUMBER in the top-left corner of your screen? $ sudo glxgears
# CHALLENGE
# “…Flipped frames is the source rate so the difference between flipped fps and encoded fps tells us when the pcoip protocol is operating slower than the source…”
# Use a 'tail’ & ‘grep’ shell commands when connected to your host machine via SSH to monitor how the protocol is performing. Replace
# CHALLENGE ANSWER # Answer: https://pastecode.xyz/view/09ee3e97 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Windows: Teradici s/w client
# Enter: Administrator
# Enter:
# check driver installed System Tray -> NVIDIA Settings -> System Information
# use Teradici System Tray icon to verify Teradici license status and check for CAS update Click: “Install Updates” to update CAS 2.15 to 2019.11
# Why won’t the above work? Close your Teradici connection and use RDP [use your credentials] to connect and then try upgrading. Connect back again using Teradici software client
# start Powershell… Search Icon -> type: powershell
# check pcoip-agent logs – note any differences between what content each log file stores cd c:\ProgramData\Teradici\PCoIPAgent\logs\ Windows: Blender, VLC player # install blender cd Downloads choco install blender # [A]ll – yes to all
# download blender 3D scene file aws s3 cp s3://cmp319-assets/blender/ .
# open scene files in Blender and test interactivity levels. Is it usable? Use 3D tools/orbit the models
# install VLC player choco install vlc # [A]ll – yes to all
# download video files from S3 and play with VLC player aws s3 cp s3://cmp319-assets/videos/ . # VLC -> “Video” -> “Full-Screen” # VLC -> “Window” -> “Media Information…” – investigate “Codec Details” & “Statistics”
# visit YouTube.com and watch a video[with audio] of your choice in FULL-SCREEN and then ½ size, then ¼ size on your screen. Observe audio-video sync Windows: Stats viewer # s3 download stats viewer - https://help.teradici.com/s/article/1032 aws s3 cp s3://cmp319-assets/installers/SSV_2.0.exe.
Double-click: SSV_2.0.exe
Connections -> VM name: localhost
Connection Check the: “Log in as current user” Windows: OpenGL smoke test # OpenGL Smoke Test - http://www2.cs.uidaho.edu/~jeffery/win32/ aws s3 cp s3://cmp319-assets/installers/wglgears.exe .
Double-click: wglgears.exe # Resize the OpenGL window and observe the FPS/number of frames in the console
# Note your results for 100%, ½, ¼ size glxgears window via PCoIP
# Repeat the above exercise by closing your Teradici session and on your Windows laptop, use RDP and your credentials to access your machine
# Note your results for 100%, ½, ¼ size glxgears window via RDP
# Finally, while connected to RDP, try using Blender and VLC applications again to compare performance vs PCoIP Summary
• Lots of GPU options on AWS – Elastic Graphics, AppStream 2.0, Amazon WorkSpaces, Unmanaged G4 • Graphics requirements? - OpenGL, OpenCL, DirectX • NVIDIA requirements? - CUDA, Vulkan, cuDNN, TensorRT, nvJPEG, cuBLAS, NVENC, NVDEC • Linux vs. Windows - depends on app stack requirements • Teradici alternative? AWS DCV streaming protocol - $ZERO on AWS • Unmanaged; more flexible? • Connection Broker? AD integration? • HA/Fault Tolerance/Backup • Deployment - CF, Terraform, Chef, Puppet, Ansible, SaltStack, Foreman, CFEngine • Automation - RunDeck [open-source] • Monitoring – Amazon CloudWatch -> Grafana [open-source] • Containers – Amazon ECS/Amazon EKS – NVIDIA Docker – Multi-tenancy/.metal/Fractional vGPU? AWS Marketplace https://aws.amazon.com/marketplace AWS Blog
https://amzn.to/2p8VNkj AWS Quick Starts
https://amzn.to/2CzrZ3m https://amzn.to/32y12rf Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.