Ceph test tool summary

fio Fio was originally written to avoid the trouble of writing special test case programs when testing a specific workload for performance reasons or finding / reproducing errors. Writing such a test application can be cumbersome, especially if you must do so often. Therefore, I need a tool that can simulate a given I / O workload without writ ...

Posted by Bhaal on Thu, 21 Oct 2021 02:28:45 +0200

JDK growth 12: ThreadLocal

In the last section, you understood what ThreadLocal is, its basic usage, and the underlying principle of the get method. In this section, let's continue to study in depth: ThreadLocal set source code principleStrong reference, weak reference, soft reference and virtual reference in JVMApplication of weak reference in ThreadLocalAnalysis of ...

Posted by wmolina on Thu, 21 Oct 2021 01:55:35 +0200

Python 3.10 is fresh on the shelves. Let's have a match case to taste it

Original link: http://www.juzicode.com/python-note-3-10-match-case The official version of Python 3.10.0 was finally released at the beginning of this month. One of the important features is that it supports match case statements. This switch case statement similar to C language is finally implemented in Python. General matching pattern A ...

Posted by cyberRobot on Thu, 21 Oct 2021 01:35:43 +0200

Deeply understand the lock free CAS mechanism, magic class Unsafe and Atomic package Atomic of Java Concurrent Programming

introduction In fact, when we explained the principle of synchronized keyword in Java Concurrent Programming in our last article, we talked about the concept of CAS many times, so what is it? In fact, in order to solve the thread safety problems caused by multi-threaded parallel execution, we often use the locking mechanism to change multi-thr ...

Posted by everknown on Wed, 20 Oct 2021 23:35:24 +0200

Strategic model of design pattern series

definition The algorithm family is defined and encapsulated respectively so that they can be replaced with each other. This mode makes the change of the algorithm not affect the users using the algorithm. The policy pattern emphasizes that multiple policies can be interchanged. These policies are different implementation classes of the same i ...

Posted by DarkTempest on Wed, 20 Oct 2021 22:34:34 +0200

LVS-DR mode + Keepalived high availability cluster

introduction In this highly information-based IT era, the production system, business operation, sales and support, daily management and other links of enterprises increasingly rely on computer information and services, resulting in a large increase in the demand for the application of high availability technology, so as to provide conti ...

Posted by netpants on Wed, 20 Oct 2021 22:07:46 +0200

Advanced part of concurrency (detailed explanation of ThreadLocal, analysis of thread pool source code, comparison of synchronized and lock) summary

Article reference source: javaguide 1.synchronized 1.1 what do you know about synchronized? Heavyweight lock. The monitor lock is used at the bottomContext switching consumes a lot of time and resources because java threads need to be converted to operating system threads and the transfer from user state to kernel stateAfter jdk1.6, a lar ...

Posted by bob_rock on Wed, 20 Oct 2021 21:37:28 +0200

Fundamentals of Java - object oriented 3

Application of abstract classes: design patterns of template classes // Application of abstract classes: design patterns of template methods public class TemplateTest { public static void main(String[] args) { Template t = new SubTemplate(); t.spendTime(); } } abstract class Template{ // Calculate the time spent exe ...

Posted by gypmaster on Wed, 20 Oct 2021 21:25:57 +0200

Python crawls data and writes it to MySQL

About the crawler crawling data and storing it in MySQL database (take the stock data on Dongfang fortune online as an example, web page: Shennan power A(000037) capital flows to data center Dongfang fortune network) The first step is to create a data table in the database import requests import pandas as pd import re import pymysql db = ...

Posted by timelf123 on Wed, 20 Oct 2021 21:22:40 +0200

Geometry Processing of PostGIS_ 1 ST_Buffer&&ST_BuildArea

1. ST_Buffer ST_Buffer - (T) returns a geometry that covers all points within a given distance from the input geometry. 1.1. Summary geometry ST_Buffer(geometry g1, float radius_of_buffer); geometry ST_Buffer(geometry g1, float radius_of_buffer, integer num_seg_quarter_circle); geometry ST_Buffer(geometry g1, float radius_of_buffer, text buf ...

Posted by uidzer0 on Wed, 20 Oct 2021 20:52:27 +0200