Compute Engine Flashcards
What is Compute Engine?
- high performance, scalable VM’s, available in preconfigured or custom machine types
- flexible pricing and automatic sustained use discounts
- runs over Google’s private global fiber network
- fast and efficient networking
- up to 64TB persistent disk with local ssd option
- transparent maintenance
- global load balancing
- Preemptible VM’s for batch processing Compute Engine instances can run the public images for Linux and Windows Server that Google provides as well as any private images that you create or import to Compute Engine. You can also build and run images of other operating systems. You can choose the machine properties of your instances, such as the number of virtual CPUs and the amount of memory, by using a set of predefined machine types or by creating your own custom machine types.
What are the tools to manage Compute Engine instances?
- Google Cloud Platform Console
- gcloud command-line tool
- REST API
- SSH for Linux, RDP for Windows for advanced configuration
What are the different machine types available on Compute Engine?
- Predefined machine types: standard, high-memory, high-cpu, shared core, mega-memory
- Custom machine types: specify cpu/ram
- GPU’s can be attached
To what instances can you NOT attach a GPU?
- shared core machine types (micro & small)
- preemptible instances
When should Compute Engine be used for running containers?
When you need complete control over your container environment and your container orchestration tools.
When should Kubernetes Engine be used for running containers?
To simplify cluster management and container orchestration tasks so that you do not need to manage the underlying virtual machine instances.
How would you create a high-performance SQL Server instance?
- Compute Engine high-memory instance
- Preconfigured SQL Server image
- SSD persistent disk storage: for high-performance sotrage of database files
- Local SSD disk : for high-performance tempdb and Windows paging file, staging data or backups
- Set power-profile to ‘High-Performance’ instead of ‘Balanced’ - Send log and db/data files to SSD persistent disk storage
- Grant ‘Lock pages in memory’ to MSSQLSERVER to prevent pagefile swapping from physical to virtual memory
- Grant ‘perform volume maintenance tasks’ to MSSQLSERVER to setup support for ‘instant file initiailization’ (allocating disk space for an application)
- Split TempDB to at least 4 files
- Set ‘max degree of parallelism’ and ‘max server memory’
What are some best-practices for SQL Server instance?
- Use the Windows Server Advanced Firewall, specifying the client IP addresses of your client computers
- Use the OS default network settings
- Follow/Use Microsoft guidance for anti-virus software
- Use a separate SSD persistent disk for log and data files
- Use local SSD to improve IOPS: tempdb and pagfile
- Monitor and maintain the growth of transaction logs. schedule backups - Optimize virtual log files
- Perform regular index defragmentation
- Perform regular backups
- Use Stackdriver monitoring
- Validate your setup
For Enterprise Edition:
- Use the ‘buffer pool’ extension, to speed data access from a cached data mirror
- Use compressed tables
What are ‘SQL Server Availability Groups?
- multiple SQL Server Enterprise instances can be configured to use Windows Server Failover and SQL Server AlwaysOn Aailability Groups, to support high-availability and disaster recovery
Requires:
1) Setting up a custom VPC network with sub-nets and firewall rules allowing traffic to internal interfaces addresses, and to allow RDP on port 3389
2) Creating a Windows domain controller with AD
3) Creating SQL Server cluster instances for the Availability Group
4) Configuring the Failover Cluster Manager
5) Create the Availability Group in SQL Server Mgmt Studio.
Talka about ‘Instances and networks’ on Compute Engine.
- Each instance belongs to a Google Cloud Platform Console project, and a project can have one or more instances. When you create an instance in a project, you specify the zone, operating system, and machine type of that instance. When you delete an instance, it is removed from the project.
- A project can have up to five VPC networks, and each Compute Engine instance belongs to one VPC network. Instances in the same network communicate with each other through a local area network protocol. An instance uses the Internet to communicate with any machine, virtual or physical, outside of its own network.
What storage options are available for Compute Engine instances?
- By default, each Compute Engine instance has a single root persistent disk that contains the operating system.
-
What is and how do you use load-balancing and autoscaling on Compute Engine?
- GCP load-balancing uses forwarding rules to match traffic and forward it to a load-balancer
- GCP load-balancing is a mamanaged service, redundant and highly-available
- Compute Engine offers auto-scaling to add and remove VM’s from an Instance Group based on load and policy configuration
- Policies: CPU Utilization, LB capacity, Stackdriver monitors
When is Connectiion Draining triggered for a Compute instance?
- When it is removed from an instance group