Java virtual machine learning (9): object reference intensity

Whether by counting algorithm to determine the number of object references, or by the root search algorithm to determine whether the object reference chain is reachable, to determine whether the object is alive or not is related to the “reference”. References are mainly divided into four types: Strong Reference, Soft Reference, Weak Reference and Phantom Reference, and the strength of the reference.Sharp decrease in turn. Strong reference:   This refers to a common occurrence in code, similar to “Object objectRef = new Obejct,” which will never be cleaned up by GC ...

Oracle — multiple count statistics. Multiple fields in a table are equal to a certain value.

Excerpts: https://www.linuxidc.com/Linux/2012-06/62894.htm case when The conditional then condition is true when the value of else is false and the value is end. --Query the number of times a unified field is equal to a value. select count(m.underwriteflag) from prpcmain m where m.underwriteflag='1' ; --720407 select count(m.nationflag) from prpcmain m where m.nationflag='1' --720422 --Merge querySelectcount(case when m.underwriteflag='1' then 1 end)Field 1, count (case when m.nationflag='1'then 1 end) field 2 from prpcmain m;     

Sql Server connection pool

In an article looking at the cache, see the three words of the connection pool to recharge. The original link is mentioned in this article. In fact, we have been using the SqlServer connection pool. In the connection string, Pooling is enabled for connection pooling, with the default value of true, indicating enablement; you can add a property of Pooling = true after the link. Two important parameters related to connection pool are Min Pool Size and MaxPool Size, which are the minimum number of connections in the pool and the maximum number of connections in the pool, with default values of 0...

Database – something you might overlook.

databases. You may have overlooked them. https://www.cnblogs.com/joylee/p/7768457.html Database management is a very professional thing, the database tuning, monitoring is usually done by database engineers, but developers also often deal with the database, even a simple addition, deletion, modification and investigation is also a lot of tricks, here, to talk about the database is easy to overlook the problem. The length of the field is saved. First, let’s talk about the storage length of our commonly used types: Column type storage length tinyint 1byte smallint 2byte int 4byte bigint ...

Selenium Java Maven automated test environment construction

Version Description: JDK Version: 1.8.0_112; Eclipse IDE: 4.6.1; Maven Version: apache-maven-3.3.9; Selenium Version: 3.0.1; FirefoxVersion: 47.0.1; : The installation packages required during the environment configuration process are provided with this document, and the user is asked to extract the corresponding compressed packages according to the following instructions.   Environmental configuration: 1.” is in Taiwan.windowsInstall JDK on the computer and execute the EXE file jdk-8u112-windows-x64.exe in the installation package. After installation, configure the environment va...

Configuring the Java environment variable does not work.

My computer has several versions of jdk, JDK1.6 and jdk1.8, but my environment variables are set to jdk1.6. However, opening CMD to see Java version shows 1.8, which makes me puzzled. Later, problems were discovered. Problem: under the path variable, JDK1.8 automatically generates variables for us, covering 1.7 of the original version. Solution: 1. remove the C:\ProgramData\Oracle\Java\javapath in the path variable.                   2.Move the%JAVA_HOME%/bin in the environment variable Path to the front end. At this time, the Java -version again in CMD will display the information o...

Java virtual machine learning (5): memory optimization

JVMTuning is mainly aimed at tuning memory management, including controlling the size of each generation, GC policy. Because the GC starts garbage collection when hanging application threads, seriously affecting performance, the purpose of tuning is to minimize the GC caused by the application thread pause time, reduce the number of Full GC. Generation size tuning Key parameters: – Xms, Xmx, – Xmn, – XX: Survivor Ratio, – XX: MaxTenuring Threshold, – XX: PermSize, – XX: MaxPermSize -Xms、 -Xmx Usually set to the same value, avoiding constantly expandin...

Java virtual machine learning (4): JDK visual monitoring tool

1.JConsole  JConsoleUnder the JDK / bin directory, after starting JConsole, the tool automatically searches for JVM processes running natively without the JPS command to query for specifications. Double-click on one of the JVM processes to start monitoring, or use Remote Processes to connect to a remote server.     To enter the JConsole main interface, there are six tabs: “Overview”, “Memory”, “Thread”, “Class”, “VM Summary” and “Mbean”: Memory tabs are the jstat commands used to monitor trends in virtual mach...