CN114490332A - System time consumption and bottleneck analysis method in web environment - Google Patents

System time consumption and bottleneck analysis method in web environment Download PDF

Info

Publication number
CN114490332A
CN114490332A CN202111618186.3A CN202111618186A CN114490332A CN 114490332 A CN114490332 A CN 114490332A CN 202111618186 A CN202111618186 A CN 202111618186A CN 114490332 A CN114490332 A CN 114490332A
Authority
CN
China
Prior art keywords
performance
bottleneck
consumption
steps
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111618186.3A
Other languages
Chinese (zh)
Inventor
杨钊
胡守云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Seeyon Internet Software Corp
Original Assignee
Beijing Seeyon Internet Software Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Seeyon Internet Software Corp filed Critical Beijing Seeyon Internet Software Corp
Priority to CN202111618186.3A priority Critical patent/CN114490332A/en
Publication of CN114490332A publication Critical patent/CN114490332A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for analyzing system time consumption and bottleneck in a web environment, which comprises the following steps: A. performance definition; B. adjusting the performance, measuring the current situation of the system, measuring indexes and setting an adjusting target; C. the invention provides a method for analyzing the system time consumption and bottleneck under a general web environment, wherein the method is used for analyzing and positioning the system bottleneck through the method when the system cannot meet the requirements on performance before the target system is on-line, the response speed of the system is slower and slower along with the continuous increase of the data volume and the continuous increase of the access volume of the system after the target system is on-line operated and the service requirement is not met, and an effective performance optimization means is formulated through the method.

Description

Method for analyzing system time consumption and bottleneck in web environment
Technical Field
The invention relates to the technical field of software, in particular to a method for analyzing system time consumption and bottleneck in a web environment.
Background
The performance of the written new application cannot meet the requirements before the new application is online; after the application system runs on line, along with the continuous increase of the data volume and the continuous rise of the access volume of the system, the response speed of the system is generally slower and slower, and the service requirement is not met; when the new application is on line, the system runs on the line for a period of time, performance problems occur, the performance problems can not be positioned quickly, and the situations of premature optimization, excessive optimization and optimization without service as a basis exist.
Disclosure of Invention
The invention aims to provide a method for analyzing system time consumption and bottleneck in a web environment, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a method for analyzing system time consumption and bottleneck in a web environment comprises the following steps:
A. performance definition;
B. adjusting the performance, measuring the current situation of the system, measuring indexes and setting an adjusting target;
C. and (4) optimizing the performance, establishing an optimization mode and steps after determining the performance bottleneck, and verifying to achieve the performance target.
Preferably, the method for analyzing the system time consumption and the bottleneck in the web environment, provided by the application, includes the following specific steps: defining a general principle of performance optimization, and selecting proper measurement indexes, test cases and test environments; performance optimization general principles.
Preferably, the method for analyzing the system time consumption and the bottleneck in the web environment provided by the present application, wherein the step B specifically includes: using the test case to obtain performance data in a proper test environment, and determining a bottleneck point; setting a tuning target based on the current system status, including information such as request times, response time, resource consumption and the like of the current system, wherein the tuning target is estimated according to the response speed accepted by a user or the machines owned by the system and the supported user quantity; the search for performance bottlenecks is divided into two parts: finding code that consumes resources excessively and finding reasons and code that does not use resources sufficiently but that the program is slow to execute.
Preferably, the method for analyzing the system time consumption and the bottleneck in the web environment, provided by the application, comprises the following steps: the response speed of the system is slow due to the consumption of resources, and the resources mainly refer to: resources in the aspects of CPU, memory, file IO, network IO and the like are consumed; the insufficient performance of the external processing system mainly refers to the functions provided by other called systems; the called other system performance is too much in resource consumption under most conditions, but the program performance is insufficient; finding the cause and code that underuses resources but program execution is slow: the main reasons that the resources are not consumed much but the response speed of the program still does not meet the requirement are that the program code runs inefficiently, the resources are not fully used or the program structure is not reasonable.
Preferably, the method for analyzing the system time consumption and the bottleneck in the web environment provided by the present application, wherein the resource consumption analysis specifically includes: CPU consumption analysis, file IO consumption analysis, network IO consumption analysis and memory consumption analysis.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a method for analyzing the time consumption and the bottleneck of a system in a general web environment, when a target system cannot meet the requirements on performance before being online, and the response speed of the system is slower and slower along with the continuous increase of the data volume and the continuous rise of the access volume of the system after the online operation, and the service requirements are not met, the method can be used for analyzing and positioning the bottleneck of the system and formulating an effective performance optimization means.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention provides the following technical solutions: a method for analyzing system time consumption and bottleneck in a web environment comprises the following steps:
A. performance definition;
B. adjusting the performance, measuring the current situation of the system, measuring indexes and setting an adjusting target;
C. a performance tuning idea is adopted, after a performance bottleneck is determined, an optimization mode and steps are formulated, and the performance target is verified; the service code is unfavorable, such as too many for loops, many unnecessary condition judgments, the same logic is repeated for many times, and the like. The database tuning mainly comprises the following steps: SQL tuning, architecture level tuning, and connection pool tuning. Caching, asynchronous, multi-threaded, and distributed. And JVM is adjusted and optimized.
The invention provides a method for analyzing system time consumption and bottleneck in a web environment, wherein the step A specifically comprises the following steps: defining a general principle of performance optimization, and selecting proper measurement indexes, test cases and test environments; performance optimization general principles.
In a narrow range, performance tuning mainly refers to improving various performance indexes of a software product, such as response time, by modifying technical means such as software program logic, structure and the like.
In a narrow sense, performance tuning can be initiated from hardware (computer architecture), operating system (OS \ JVM), file system, network communication, database system, middleware, application itself, and so on. The performance optimization is a long-term behavior, so that the actual condition of the performance can be objectively reflected only by fixing the measurement indexes, the test cases and the test environment, and the optimization effect can be shown. There are many metrics for measuring performance, such as system response time, system throughput, and system concurrency. Different system core indexes are different, and firstly, the core performance appeal of the system is clarified, and test cases are fixed.
Reference indices for performance: execution time: a piece of code uses the time from the beginning of the run to the end of the run. CPU time: an (algorithmic) function or thread takes up CPU time. Memory allocation: memory space occupied by the program during runtime. Disk throughput: I/O usage is described. Network throughput: the use of the network is described. Response time: the time at which the system responds to a certain user behavior or action. The shorter the response time, the better the performance.
The invention provides a method for analyzing system time consumption and bottleneck in a web environment, wherein the step B specifically comprises the following steps: using the test case to obtain performance data in a proper test environment, and determining a bottleneck point; setting a tuning target based on the current system status including information such as request times, response time, resource consumption and the like of the current system, wherein the tuning target is estimated according to the response speed accepted by a user or machines owned by the system and the supported user quantity; the search for performance bottlenecks is divided into two parts: finding code that consumes resources excessively and finding reasons and code that does not use resources sufficiently but that the program is slow to execute.
Wherein, finding the performance bottleneck comprises: the response speed of the system is slow due to the consumption of resources, wherein the resources mainly refer to: resources in the aspects of CPU, memory, file IO, network IO and the like are consumed; the insufficient performance of the external processing system mainly refers to the functions provided by other called systems; the called other system performance is too much in resource consumption under most conditions, but the program performance is insufficient; finding the cause and code that underuses resources but program execution is slow: the main reasons that the resources are not consumed much but the response speed of the program still does not meet the requirement are that the program code runs inefficiently, the resources are not fully used or the program structure is not reasonable.
The resource consumption analysis specifically includes: CPU consumption analysis: the CPU is mainly used for task processing of interrupt, kernel and user process, and the priority is interrupt > kernel > user process. Typical consumption reasons are: context switching, running queues, utilization. For Java applications, typically, when performing file IO operation, network IO operation, lock waiting, and thread Sleep, a current thread may enter a blocking or dormant state, thereby triggering context switching, and excessive context switching may cause a kernel to occupy more CPUs.
Analyzing IO consumption of the file: for Java applications, the high file IO consumption is mainly caused by actions that multiple threads need to write a large amount of content (e.g. frequent log writing), the processing speed of the disk device itself is slow, the file system is slow, and the operated file itself is large.
Analyzing the IO consumption of the network: for distributed Java applications, the network card interrupts are distributed to CPUs (cat/proc/interrupts view) or not.
Analyzing memory consumption: for Java applications, the memory consumption is mainly on the Java heap memory, and only creating threads and using Direct byte buffer will operate the memory outside the JVM heap. The JVM memory consumption is too much, which causes frequent GC execution, increased CPU consumption, and severe decrease in the execution speed of the application thread, even causing outofmemoryrer, and finally causing the Java process to exit. Memory outside the JVM heap, swap consumption, physical memory consumption, JVM memory consumption.
The program performs slow cause analysis, lock contention is intense, thread operations are serialized, and the amount of data grows. The service code is unfavorable, such as too many for loops, many unnecessary condition judgments, the same logic is repeated for many times, and the like.
In summary, the invention provides a method for analyzing system time consumption and bottleneck in a general web environment, when a target system cannot meet requirements in performance before being online, and after the target system is online operated, along with the continuous increase of system data volume and the continuous rise of access volume, the response speed of the system is slower and slower, and when the service requirements are not met, the method can be used for analyzing and positioning the system bottleneck and formulating an effective performance optimization means.
It should be noted that, in this document, terms such as "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (5)

1. A method for analyzing system time consumption and bottleneck in a web environment is characterized by comprising the following steps: the method comprises the following steps:
A. performance definition;
B. adjusting the performance, measuring the current situation of the system, measuring indexes and setting an adjusting target;
C. and (4) optimizing the performance, establishing an optimization mode and steps after determining the performance bottleneck, and verifying to achieve the performance target.
2. The method for analyzing system time consumption and bottleneck in a web environment according to claim 1, wherein the method comprises the following steps: the step A specifically comprises the following steps: defining a general principle of performance optimization, and selecting proper measurement indexes, test cases and test environments; performance optimization general principles.
3. The method for analyzing system time consumption and bottleneck in a web environment according to claim 1, wherein the method comprises the following steps: the step B specifically comprises the following steps: using the test case to obtain performance data in a proper test environment, and determining a bottleneck point; setting a tuning target based on the current system status, including information such as request times, response time, resource consumption and the like of the current system, wherein the tuning target is estimated according to the response speed accepted by a user or the machines owned by the system and the supported user quantity; the search for performance bottlenecks is divided into two parts: finding code that consumes resources excessively and finding reasons and code that does not use resources sufficiently but that the program is slow to execute.
4. The method for analyzing system time consumption and bottleneck in a web environment according to claim 3, wherein the method comprises the following steps: finding performance bottlenecks includes: the response speed of the system is slow due to the consumption of resources, and the resources mainly refer to: resources in the aspects of CPU, memory, file IO, network IO and the like are consumed; the insufficient performance of the external processing system mainly refers to the functions provided by other called systems; the called other system performance is too much in resource consumption under most conditions, but the program performance is insufficient; finding the cause and code that underuses resources but program execution is slow: the main reasons that the resources are not consumed much but the response speed of the program still does not meet the requirement are that the program code runs inefficiently, the resources are not fully used or the program structure is not reasonable.
5. The method for analyzing system time consumption and bottleneck in a web environment according to claim 3, wherein the method comprises the following steps: the resource consumption analysis specifically includes: CPU consumption analysis, file IO consumption analysis, network IO consumption analysis and memory consumption analysis.
CN202111618186.3A 2021-12-27 2021-12-27 System time consumption and bottleneck analysis method in web environment Pending CN114490332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111618186.3A CN114490332A (en) 2021-12-27 2021-12-27 System time consumption and bottleneck analysis method in web environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111618186.3A CN114490332A (en) 2021-12-27 2021-12-27 System time consumption and bottleneck analysis method in web environment

Publications (1)

Publication Number Publication Date
CN114490332A true CN114490332A (en) 2022-05-13

Family

ID=81496269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111618186.3A Pending CN114490332A (en) 2021-12-27 2021-12-27 System time consumption and bottleneck analysis method in web environment

Country Status (1)

Country Link
CN (1) CN114490332A (en)

Similar Documents

Publication Publication Date Title
US7219241B2 (en) Method for managing virtual and actual performance states of logical processors in a multithreaded processor using system management mode
US7159133B2 (en) Low-power processor hint, such as from a pause instruction
US8046758B2 (en) Adaptive spin-then-block mutual exclusion in multi-threaded processing
US8826270B1 (en) Regulating memory bandwidth via CPU scheduling
US20090165007A1 (en) Task-level thread scheduling and resource allocation
JP7039631B2 (en) Methods, devices, devices, and storage media for managing access requests
JP5752111B2 (en) Multiprocessor computing device
US8397052B2 (en) Version pressure feedback mechanisms for speculative versioning caches
US20140129784A1 (en) Methods and systems for polling memory outside a processor thread
US20120297216A1 (en) Dynamically selecting active polling or timed waits
Lozi et al. Fast and portable locking for multicore architectures
US20160179429A1 (en) Controlling memory access conflict of threads on multi-core processor with set of highest priority processor cores based on a threshold value of issued-instruction efficiency
CN111052094B (en) Spin lock efficiency enhancement for user space using C-state and turbo acceleration
US8756603B2 (en) Virtual machine stage detection
US20230127112A1 (en) Sub-idle thread priority class
US20020184290A1 (en) Run queue optimization with hardware multithreading for affinity
EP1693743A2 (en) System, method and medium for using and/or providing operating system information to acquire a hybrid user/operating system lock
US8516482B2 (en) Virtual machine assigning method and storage medium thereof, information processing device having virtual machine environment
US10671453B1 (en) Data storage system employing two-level scheduling of processing cores
Yu et al. Colab: a collaborative multi-factor scheduler for asymmetric multicore processors
CN116225686A (en) CPU scheduling method and system for hybrid memory architecture
Ilsche et al. Powernightmares: The challenge of efficiently using sleep states on multi-core systems
US8862786B2 (en) Program execution with improved power efficiency
CN114490332A (en) System time consumption and bottleneck analysis method in web environment
US9223641B2 (en) Multicore processor system, communication control method, and communication computer product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination