• Memory fragmentation of openresty and nginx shared memory area


    Memory fragmentationIs a common problem in computer system, although there are many ingenious algorithms to solve this problem. Memory fragmentation will waste empty and idle memory blocks in the memory area. These free memory blocks cannot be merged into larger memory areas to meet the application’s future application for larger memory blocks, and cannot be […]

  • Master the use of Hongmeng light kernel static memory, starting with source code analysis


    Summary:Static memory is essentially a static array. The block size in the static memory pool is set during initialization, and the block size cannot be changed after initialization. A static memory pool consists of a control block and several memory blocks of the same size. The control block is located at the head of the […]

  • MySQL operation principle [data page]


    According to MySQL technology insider: InnoDB storage engine (Second Edition)Nuggets brochure “how MySQL works: understanding MySQL from the root”A summary of the two books Article referenceTaobao database kernel group monthly reportThe figures in this article are taken from inside MySQL Technology: InnoDB storage engine (Second Edition) summary In the previous article introducing the table, I […]

  • Redis centralized cache of sprinboot


    Redis centralized cache of sprinboot How to use redis to implement data caching in spring boot cache support. Add related dependencies in pom.xml <!– redis –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency> <!– redis end–> be careful staySpring Boot 1.xIn previous versions of, the dependency was namedspring-boot-starter-redis Add configuration information to the configuration […]

  • Java implements four dynamic memory allocation algorithms in the operating system: BF + NF + WF + FF


    1 Overview This paper usesJavaFour dynamic memory allocation methods in the operating system are realized: BF NF WF FF It is divided into two parts. The first part introduces the concepts and examples of four allocation methods, and the second part is the code implementation and explanation. 2. Four distribution methods 2.1 concept There is […]

  • Some simple usage of redis cache in springboot


    1. Import redis dependencies <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 2. Configure redis in application.properties #Redis configuration #Redis server address spring.redis.host= #Redis server connection port spring.redis.port=6379 #Redis database index (0 by default) spring.redis.database=0 #Maximum number of connections in the connection pool (negative value indicates no limit) spring.redis.jedis.pool.max-active=50 #Maximum blocking wait time of connection pool (negative value indicates […]

  • How to perform Linux performance analysis in 60 seconds


    When you log in to a Linux server and need to do performance analysis because of a problem: what tests will you do in the first minute? In Netflix, we have many EC2 Linux machines, and we also need many performance analysis tools to monitor and check their performance. It includes atlas, a monitoring tool […]

  • Android recycleview split line colored egg


    I have collected some learning materials, including a lot of learning, interview, middle and high-level fluuter materials, and a lot of video explanations. If any students want to know more, please see the end of the article for details. We also welcome all the great gods to install X. First of all, the problem How […]

  • Research on common pool 2 pooling Technology


    1、 Foreword We are often exposed to various pooling technologies or concepts, including object pool, connection pool, thread pool, etc. the biggest advantage of pooling technology is to realize the reuse of objects, especially when creating and using large objects or valuable resources (HTTP connection objects, MySQL connection objects), which can greatly save system overhead, […]

  • How does nginx configure HTTP, HTTPS, WS and WSS?


    Write in front In today’s Internet field, nginx is one of the most used proxy servers. Many large factories use nginx as a proxy server in their business systems. Therefore, it is necessary for us to understand the configurations of nginx for HTTP, HTTPS, WS and WSS. Come on, learn nginx from some glaciers, advance […]

  • Using asynchronous tasks in swoole


    Perform asynchronous tasks # server.php $serv = new Swoole\Server(“”, 9501); //Sets the number of worker processes for asynchronous tasks $serv->set(array(‘task_worker_num’ => 4)); $serv->on(‘Connect’, function ($serv, $fd) { echo “Client: Connect.\n”; }); //This callback function is executed in the worker process $serv->on(‘Receive’, function ($serv, $fd, $from_id, $data) { $serv->send($fd, “Server: “.$data); //To task_ The worker process […]

  • On the memory layout of program


    preface 1. What are user space and kernel space? 2. What is the typical memory layout in the next Linux Process? 3. What is stack area? 4. What is heap area? 5. How to implement malloc algorithm? 6. How many heap space allocation methods are there in Linux? Do you have any answers to the […]