CPU and GPU - The Evolution and Development of Heterogeneous Computing

The pattern of development of most things in the world is similar. In the beginning, relatively general solutions tend to appear to solve most problems, followed by solutions specifically designed for a certain scenario that do not solve general problems but perform extremely well in some specific areas. In the field of computing, the CPU (Central Processing Unit) and the GPU (Graphics Processing Unit) are general-purpose and specific solutions, respectively, with the former providing the most basic computing power to solve almost any problem, and the latter excelling in areas such as graphics computing and machine learning.

Why Linux and macOS don't need defragmentation

I believe that many software engineers today use Linux or macOS systems, and unlike Windows, we hardly see the concept of disk defragmentation. From personal experience, the author has not defragmented a disk in macOS for the past seven or eight years, and you won’t find any related operations in today’s disk tools, only the diskutil command to set whether a disk is defragmented on or off. Windows operating systems may need to defragment their disks every once in a while, and there are two reasons behind this problem: one is that Windows uses a very simple file system called FAT, which is designed in such a way that the same files may be scattered in different locations on the disk, and the other is that solid state drives were not popular in the ancient times and mechanical hard drives have poor random read and write performance.

Linux installation of swap swap partition size setting

Swap in Linux is similar to virtual memory in Windows, which means that when there is a shortage of memory, a portion of the hard disk space can be used as virtual memory, thus solving the problem of insufficient memory capacity. When installing a Linux system you need to set up a separate swap partition while Windows installation does not have this requirement, mainly because of the different ways of implementation.

Talking about the problems and limitations of Kubernetes

Kubernetes, released in 2014, has become the de facto standard in container orchestration today, and I’m sure developers who talk about Kubernetes will repeat the above phenomenon over and over again. As the chart below shows, most individuals or teams today choose Kubernetes to manage containers, and 75% of people use Kubernetes in production environments. In this context of universal learning and use of Kubernetes, it is also important to be very clear about what the limitations of Kubernetes are.

Using redux in react

Redux is a state container for JavaScript that provides predictable state management. Redux is generally used with React, but it can also be used in Vue, which is said to be based on Redux. In complex projects, it is unrealistic to communicate between components by passing props layer by layer, which requires global unified state management, as well as the need to know the process of state change to facilitate

Vue directive to implement OutClick

In general, the most listened to business is Click event, but in some business such as Alert and Pop effect, you need to listen to the click outside the element to close the pop-up window. Original Implementation Here are two common ways to implement the modal box Option 1: The default click is placed in the bubble stage, just add a click on the content area to prevent bubbling 1

Php Image Installation Module

The default php:7.0.33-fpm image is missing a lot of modules, so building it directly using Dockerfile would be a bit of a hassle, and it’s also quite large. So I went directly into the container and installed it, and finally generated an image of my own tmaize/php7-fpm based on the container. I’ll record the steps here, maybe I’ll use them later Description The original image already has the following source

Which is better, MySQL or PostgreSQL?

There are already many articles on the web comparing PostgreSQL with MySQL, this article is just to sort out some important information. Before we start our analysis, let’s take a look at these two charts. MySQL MySQL claims to be the most popular open source database, and the M in LAMP refers to MySQL. MySQL is used by applications built on LAMP, such as WordPress, Drupal and most php open source programs.

MySQL Storage Engines MyISAM, InnoDB

In the process of using MySQL, I have some questions about the concepts of MyISAM and InnoDB, and what is the difference between the two engines has always been a question in my mind. In order to solve this puzzle, I searched the web and found the following information. MyISAM is the default database engine of MySQL (before version 5.5), improved by the earlier ISAM (Indexed Sequential Access Method). Although the performance is excellent, it has one drawback: it does not support transaction.

The difference between Redis and Memcached

When you think of Redis, you think of Memcached, and vice versa. Those who know both have a general impression that Redis supports simple key-value data types compared to Memcached, and also provides storage for data structures such as list, set, zset, and hash; redis supports data backup, redis supports data persistence, and it looks like redis is more powerful than memcached. The redis support for data backup, redis support for data persistence, looks redis than memcached more awesome, so in fact is this not the case?

AlertManager When to Alert

When using Prometheus for monitoring, alerting is done through AlertManager, but there are many people who are confused about the configuration related to alerting and are not quite sure when exactly it will be done. Here we will briefly introduce a few confusing parameters in AlertManager. First of all, there are two global parameters scrape_interval and evaluation_interval in Prometheus. The scrape_interval parameter represents the time interval at which Prometheus grabs

Creating a Grafana Dashboard with Kubernetes Resource Objects

When we use Grafana Dashboard to display our monitoring charts, we often go to someone else’s Dashboard and change it, but this also causes many people using Grafana to have no idea how to customize a Dashboard, although it is not very difficult. Here we introduce a relatively new tool: DARK, full name Dashboards As Resources in Kubernetes., which means that through the Kubernetes resource object to define Grafana Dashboard,

Envoy simple example

Envoy is an open source edge and service agent designed for cloud-native applications, and the default data plane for Istio Service Mesh. In this article, we introduce the basic use of Envoy with a simple example. 1. Configuration Creating a proxy configuration Envoy uses YAML configuration files to control the behavior of the proxy. In the following steps we will build the configuration using a static configuration interface, which means that all settings are predefined in the configuration file.

Kubernetes HPA Usage Explained

In the previous study, we used a kubectl scale command to implement Pod scaling, but this is after all a completely manual operation. To this end, Kubernetes also provides us with such a resource object: Horizontal Pod Autoscaling, or HPA for short, which monitors and analyzes the load changes of all Pods controlled by some controllers to determine whether the number of copies of Pods needs to be adjusted. The

Using NodeLocal DNSCache in a Kubernetes Cluster

When solving the 5-second timeout problem with CoreDNS, we mentioned using NodeLocal DNSCache to solve the problem, in addition to forcing tcp resolution through dnsConfig. NodeLocal DNSCache improves clusterDNS performance and reliability by running a DaemonSet on the cluster nodes. Pods in ClusterFirst’s DNS mode can connect to kube-dns’s serviceIP for DNS queries. This is converted to a CoreDNS endpoint via iptables rules added by the kube-proxy component. By running

Describing Kubernetes Applications Using Programming Languages - cdk8s

cdk8s is a new framework released by AWS Labs written in TypeScript that allows us to define resource lists for Kubernetes using a number of object-oriented programming languages. cdk8s also ends up generating native Kubernetes YAML files, so we can use cdk8s to define running Kubernetes application resources from anywhere. Introduction The concept of constructs is provided in cdk8s, and they are abstractions of Kubernetes resource objects (Deployment, Service, Ingress,

Docker installation of multi-user version of JupyterHub

The host server is using Ubuntu 18.04. Note that Docker does not currently support Ubuntu 19.10. To use Docker in 19.10, you need to set the Ubuntu 18.04 version identifier: bionic in the Docker source configuration. 1 deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable Docker installation The installation process of Docker is very simple, just execute the following command. 1 2 3 4 5 6 7 8 9 sudo apt remove docker

How to understand Schema schema of database

When learning database, you will encounter a confusing concept of Schema. In fact, schema is a collection of database objects, this collection contains various objects such as: tables, views, stored procedures, indexes, etc.. If we consider database as a warehouse, there are many rooms in the warehouse (schema), a schema represents a room, table can be seen as a locker in each room, user is the owner of each schema, has the right to operate each room in the database, that is to say, each database mapping user has the key to each schema (room).

Tree structured data database storage solution

In the program development, we often encounter a tree structure to represent the relationship between certain data, such as the organizational structure of the enterprise, the classification of goods, operation columns, etc., the current relational database is to store data in the form of two-dimensional table records, and the tree structure of the data must be stored in the two-dimensional table Schema design. Recently, we have been interested in this

MySQL High Performance Storage Engine TokuDB

When installing MariaDB, I learned about TokuDB, which replaces InnoDB, and it’s great to see the introduction. What is TokuDB? The most popular MySQL engine that supports full transactions is INNODB, which is characterized by the fact that the data itself is organized by B-TREE, which is a huge B-TREE index clustered by primary key. So at this point, the write speed will be somewhat reduced, because to write each time to use an IO to do the index tree rearrangement.