Xiao Wang's six-year creative process in CSDN

growing up

I started with CSDN in 2016, and now I have been a six-year-old user, and I have grown from a student to a back-end development engineer in the company.

insert image description here


I remember that I was still a student at that time. The school taught a C++ course, and later I came into contact with Java for various reasons. Due to the reasons of beginners, I often encountered some strange bugs, and there were also some needs Installed software, so I developed the habit of searching for information on the Internet, often learning knowledge, modifying bugs, installing software, etc. in various posts on the CSDN platform...


Later, with the deepening of my studies, I came into contact with more and more knowledge, and gradually I could discover, analyze, and find problems by myself, and I also had the urge to share new knowledge, so I started Try to start your own blog creation, from the basic knowledge of Java, to data structures and algorithms, to the output of various architectures and learning routes, etc., and now look back at every blog I have published, from the immaturity of technology to Continuously deepening, CSDN recorded the process of my entire Java learning career!

Inexperienced early articles:
insert image description here
The current articles of the first appearance:
insert image description here
insert image description here


give back

Xiao Wang's writing in recent years has always been adhering to the concept of helping more and more students enter Dachang, so all articles are free, and various resources appearing in the articles are also provided to fans for free, including the previous spending The Spring source code parsing series written with the most thoughts, but after tangled for a long time, it is still not set up as a paid column:

insert image description here
https://blog.csdn.net/hnu_csee_wjw/category_10931055.html

Of course, the creative process is painful, but the harvest is indeed a joy. Whenever I receive a private message from a fan in the backstage saying that it helped him solve a problem, this feeling is amazing~


future creative planning

Friends who have often followed me may have noticed that my recent writing focuses on outputting some commonly used technologies in the Ali Department, which is different from the common interview series in CSDN. I hope to take this opportunity to help you broaden your horizons, especially students.


In my opinion, some of the theories in many classic Java books are no longer applicable to today's distributed systems. For example, how should the number of threads for Java multithreading be set?

"Java Concurrency in Practice" writes:

For CPU-intensive tasks, it is recommended to set the number of threads to the number of CPU cores + 1

"Programing Concurrency on the JVM" writes:

Minimum number of threads = number of CPU cores

For IO-intensive services, it is recommended to set the number of threads to the number of CPU cores / (1-blocking factor) , where
insert image description here

There is also a popular saying that the number of threads = 2* the number of CPU cores

Cruelly, the above theories are not correct now, for the following reasons:

  • The above two books are too old to be written for today's microservices, the new JVM, etc.

  • The above formulas pay too much attention to the number of CPU cores, but in fact, many complex services in today's cloud technology only run on 2-core 8G CPUs, and 2-core 8G is also the standard server of Alibaba Cloud.

  • Hybrid deployment is more commonly used today, where IO-intensive services and CPU-intensive services are deployed together, which makes any of the above formulas unusable


So what is the right way to do it?
In fact, the truth has to be obtained from practice , and it needs to be verified by testing to get the final optimal number of threads. Testing and verification is based on performance testing as the background, during which the number of threads can be continuously increased and decreased

  • When increasing the number of threads: If the number of requests per second (QPS) processed by the interface does not increase, or even the response time of the interface becomes longer, the number of threads set at this time may have exceeded the optimal number of threads

  • When reducing the number of threads: If the interface QPS drops, it means that there is still room for improvement in cluster performance

Through the above two conditions, the optimal number of threads can be pressed in the test (this is also the current practice of most Taoist applications~~)


So in my opinion, regularly updating one's own knowledge reserve is the premise of ensuring one's competitiveness. In the final analysis, the 35 mid-life crisis is that personal technology can no longer keep up with the rhythm, and the best way to maintain the rhythm is to keep learning, not only To learn the theory on the books, but also to learn how the technology is implemented.


In addition, in the second half of the year, I will try the creation of a new column. The relevant preparations are already in progress, and it is still free. I hope you can gain something after reading my article, everyone will work hard~

Guess you like

Origin blog.csdn.net/HNU_Csee_wjw/article/details/123950815