CN102033784A - Method and device for optimizing application server - Google Patents

Method and device for optimizing application server Download PDF

Info

Publication number
CN102033784A
CN102033784A CN2010105497900A CN201010549790A CN102033784A CN 102033784 A CN102033784 A CN 102033784A CN 2010105497900 A CN2010105497900 A CN 2010105497900A CN 201010549790 A CN201010549790 A CN 201010549790A CN 102033784 A CN102033784 A CN 102033784A
Authority
CN
China
Prior art keywords
sql
application server
reference value
preset reference
wall scroll
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.)
Granted
Application number
CN2010105497900A
Other languages
Chinese (zh)
Other versions
CN102033784B (en
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.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering Co Ltd
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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN 201010549790 priority Critical patent/CN102033784B/en
Publication of CN102033784A publication Critical patent/CN102033784A/en
Application granted granted Critical
Publication of CN102033784B publication Critical patent/CN102033784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a device for optimizing an application server. The structured query language (SQL)-related data processed by the application server can be acquired in real time, the related data is compared with a preset reference value, and the maximum thread number of an application server connection pool is correspondingly changed according to a comparison result so as to automatically optimize the performance of the application server.

Description

A kind of optimization method of application server and device
Technical field
The present invention relates to the server technology field, particularly relate to a kind of optimization method and device of application server.
Background technology
Application server can become to cyberprise and use the basic software that running environment is provided with after database resource is connected, and can handle the service logic computing that enterprise uses concurrently.Along with the fast development of network, the requirement of people's application server is more and more higher.Therefore performance how effectively to optimize application server becomes a problem demanding prompt solution.
The optimization of existing application server performance need rely on the technician to carry out, and the method for optimization and thinking rely on technician's experience fully.For example, optimize the slip-stick artist and accumulate by long term experience, according to the ruuning situation of application server, the parameter of application server is set, so that application server processes speed accelerates, reaches the purpose of optimizing application server performance.
But the optimization of existing application server performance can't realize the Automatic Optimal of application server performance.
Summary of the invention
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of optimization method and device of application server, and to realize the Automatic Optimal of application server performance, technical scheme is as follows:
A kind of optimization method of application server comprises:
Obtain the related data of application server processes Structured Query Language (SQL) SQL in real time,
Wherein, described related data comprises: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Described related data and preset reference value are compared,, then reduce the maximum thread of application server connection pool,, then increase the maximum thread of application server connection pool if less than the preset reference value if greater than the preset reference value.
Preferably, the processing time of described wall scroll SQL is:
The maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL or the Preset Time section in the Preset Time section.
Preferably, the method to set up of described preset reference value comprises:
Under application server load stable case, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value.
Preferably, the method to set up of described preset reference value comprises:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value.
Preferably, the method to set up of described preset reference value comprises:
Obtain the CPU quantity of application server, with the described CPU quantity of prearranged multiple as the preset reference value.
Corresponding to the optimization method of a kind of application server of front, the present invention also provides a kind of optimization means of application server, comprising:
Data acquisition module is used for obtaining in real time the related data of application server processes Structured Query Language (SQL) SQL,
Wherein, described related data comprises: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Data comparison module is used for described related data and preset reference value are compared;
Thread Count changes module, is used in described related data reducing the maximum thread of application server connection pool during greater than the preset reference value, during less than the preset reference value, increases the maximum thread of application server connection pool in described related data.
Preferably, the processing time of described wall scroll SQL is:
The maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL or the Preset Time section in the Preset Time section.
Preferably, described data acquisition module concrete configuration is:
Under the stable situation of application server load, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value.
Preferably, described data acquisition module concrete configuration is:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value.
Preferably, described data acquisition module concrete configuration is:
Obtain the CPU quantity of application server, with the described CPU quantity of prearranged multiple as the preset reference value.
The present invention is by using above technical scheme, the processing time and the preset reference value of the Structured Query Language (SQL) obtained in real time can be compared, and according to the automatic corresponding increase of comparative result or reduce the value of application server connection pool, to realize the Automatic Optimal of application server performance.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, the accompanying drawing that describes below only is some embodiment that put down in writing among the present invention, for those of ordinary skills, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of optimization method of a kind of application server of the embodiment of the invention;
Fig. 2 is the process flow diagram of optimization method of the another kind of application server of the embodiment of the invention;
Fig. 3 is the process flow diagram of optimization method of the another kind of application server of the embodiment of the invention;
Fig. 4 is the structural representation of optimization means of a kind of application server of the embodiment of the invention.
Embodiment
In order to make those skilled in the art person understand technical scheme among the present invention better, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtained should belong to the scope of protection of the invention.
As shown in Figure 1, the optimization method of a kind of application server provided by the invention comprises:
S101, obtain the related data of application server processes SQL (Structured Query Language, Structured Query Language (SQL)) in real time,
Wherein, described related data can comprise: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Certainly, it will be appreciated by persons skilled in the art that the related data of SQL can also be other data, for example: the handled SQL type of application server.
Wherein, the processing time of wall scroll SQL can be the maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL in: the Preset Time section or the Preset Time section.
S102, described related data and preset reference value are compared,, then reduce the maximum thread of application server connection pool,, then increase the maximum thread of application server connection pool if less than the preset reference value if greater than the preset reference value.
Wherein, the preset reference value can artificially be set, and also can add up and/or calculate the preset reference value according to the historical record of application server processes SQL.
In actual applications, when described related data equates with the preset reference value, can no longer change the maximum thread of application server connection pool.
Need to prove that the application server connection pool is a kind of equipment that belongs to middleware, can control the quantity that application server is wanted treatment S QL according to maximum thread is set.When the maximum thread of connection pool became big, application server institute SQL quantity to be processed became big; When the maximum thread of connection pool diminished, application server SQL quantity to be processed diminished.For fixing application server, its processing power is fixed, when application server institute SQL quantity to be processed more for a long time, the processing time of wall scroll SQL will be longer.
Be connected with database because application server is many, the behavior of database being inquired about by application server processes SQL, so the quantity of and/or application server concurrent processing SQL long when the time of application server processes SQL more for a long time, phenomenon of blocking can appear in database.So,, can think that stopping up appears in database when described related data during greater than the preset reference value.
The present invention is by using above technical scheme, the processing time and the preset reference value of the Structured Query Language (SQL) obtained in real time can be compared, and according to the automatic corresponding increase of comparative result or reduce the value of application server connection pool, to realize the Automatic Optimal of application server performance.
In actual applications, because each bar SQL might not be identical, so the processing time of wall scroll SQL possibility can not embody the performance of application server on higher degree.So, in other embodiments of the invention, can also obtain the related data of using server process SQL in the Preset Time section earlier, add up then and/or calculate, draw the characteristic of using server process SQL in the predetermined amount of time, as: the maximum processing time of the average handling time of wall scroll SQL, wall scroll SQL.Then described characteristic and preset reference value are compared, and corresponding change application server connection pool maximum thread, to reach the purpose that application server performance is optimized.
As shown in Figure 2, the optimization method of a kind of application server of the embodiment of the invention comprises:
S201, pick up counting;
S202, obtain the processing time of wall scroll SQL in the Preset Time section in real time;
Wherein, the Preset Time section can artificially be set, for example: 10 minutes.
Whether S203, timing reach the length of Preset Time section, if, execution in step S204 then, otherwise, execution in step S202;
S204, the processing time of the wall scroll SQL in the Preset Time section calculated the average handling time of wall scroll SQL;
Wherein, the computing method of the average handling time of wall scroll SQL can for:
The time of using server process SQL in the Preset Time section is added up,, thereby draw the average handling time of wall scroll SQL then divided by using the quantity of server process SQL in the Preset Time section.
S205, average handling time and preset reference value are compared, if greater than the preset reference value, if execution in step S206 then is less than preset reference value, execution in step S207;
Need to prove, in actual applications, before carrying out this method,, also can obtain the related data of server process SQL earlier, draw the preset reference value, and then carry out this method if the application server load is stable.Certainly, the preset reference value also can rule of thumb be accumulated by the technician and set.
Under the situation of the average handling time of wall scroll SQL, the method to set up of preset reference value comprises in related data is the Preset Time section:
Under application server load stable case, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value, for the purpose of distinguishing, be called the first preset reference value.
It will be appreciated by persons skilled in the art that the application server load is stable refers to that promptly the quantity of application server concurrent processing SQL remains in certain scope, and number change is little.
S206, reduce the maximum thread of application server connection pool;
The maximum thread of S207, increase application server connection pool.
In actual applications, when average handling time equates with the preset reference value, can no longer change the maximum thread of application server connection pool.
Certainly, in other embodiments of the invention, step S204 can also for:
The processing time of wall scroll SQL in the Preset Time section is added up the maximum processing time that draws wall scroll SQL.
Under the situation in the maximum processing time of wall scroll SQL, the method to set up of preset reference value comprises in related data is the Preset Time section:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value, for the purpose of distinguishing, be called the second preset reference value.
In actual applications, because the amplitude of variation in the maximum processing time of wall scroll SQL is bigger than the average handling time of wall scroll SQL, so the reservation multiple in maximum processing time can be than the reservation multiple height of average handling time.
Certainly, in other embodiments of the invention, can also obtain the maximum processing time of application server processes wall scroll SQL and the average handling time of wall scroll SQL simultaneously, the average handling time of wall scroll SQL and the pairing first preset reference value compare, and the maximum processing time of wall scroll SQL and the pairing second preset reference value compare.
If the average handling time of wall scroll SQL greater than maximum processing time of the first preset reference value or wall scroll SQL greater than the second preset reference value, then reduce the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value and wall scroll SQL less than the second preset reference value, then increase the maximum thread of application server connection pool.
In actual applications, the situation that also may occur equating:
If the average handling time of wall scroll SQL equals the maximum processing time of the first preset reference value and wall scroll SQL less than the second preset reference value, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the second preset reference value less than the maximum processing time of the first preset reference value and wall scroll SQL, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the maximum processing time of the first preset reference value and wall scroll SQL and equals the second preset reference value, then do not change the maximum thread of application server connection pool.
Certainly, in other embodiments of the invention, described related data can also be the quantity of maximum concurrent processing SQL.
Be that the method to set up of described preset reference value comprises under the situation of quantity of maximum concurrent processing SQL in related data:
Obtain the CPU quantity of application server, with the described CPU quantity of prearranged multiple as the preset reference value.
As shown in Figure 3, the optimization method of another kind of application server provided by the invention comprises:
S301, pick up counting;
S302, obtain the quantity of concurrent processing SQL in the Preset Time section in real time;
Wherein, the Preset Time section can artificially be set, for example: 10 minutes.
Whether S303, timing reach the length of Preset Time section, if, execution in step S304 then, otherwise, execution in step S302;
S304, the quantity of the concurrent processing SQL in the Preset Time section is added up the quantity that draws maximum concurrent processing SQL in the Preset Time section;
S305, quantity and the preset reference value of maximum concurrent processing SQL compared, if greater than the preset reference value, if execution in step S306 then is less than preset reference value, execution in step S307;
Be that the method to set up of described preset reference value comprises under the situation of quantity of maximum concurrent processing SQL in described related data:
Obtain the CPU quantity of application server, as the preset reference value, for the purpose of distinguishing, be called the 3rd preset reference value with the described CPU quantity of prearranged multiple.
It will be appreciated by persons skilled in the art that the application server load is stable refers to that promptly the quantity of application server concurrent processing SQL remains in certain scope, and number change is little.
The CPU quantity that it will be appreciated by persons skilled in the art that application server is one of key factor that influences application server processes SQL ability, and the CPU quantity of application server is many more, and the ability of its treatment S QL is big more.
S306, reduce the maximum thread of application server connection pool;
The maximum thread of S307, increase application server connection pool.
In actual applications, when the quantity of maximum concurrent processing SQL equates with the 3rd preset reference value, can no longer change the maximum thread of application server connection pool.
Certainly, in other embodiments of the invention, can also obtain the maximum processing time of application server processes wall scroll SQL, the average handling time of wall scroll SQL and the quantity of maximum concurrent processing SQL simultaneously.The average handling time of wall scroll SQL and the pairing first preset reference value compare, the maximum processing time of wall scroll SQL and the pairing second preset reference value compare, and the quantity of maximum concurrent processing SQL and pairing the 3rd preset reference value compare.
If the average handling time of wall scroll SQL greater than maximum processing time of the first preset reference value, wall scroll SQL greater than the quantity of the second preset reference value or maximum concurrent processing SQL greater than the 3rd preset reference value, then reduce the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value, wall scroll SQL less than the quantity of the second preset reference value and maximum concurrent processing SQL less than the 3rd preset reference value, then increase the maximum thread of application server connection pool.
Getting rid of under the situation of above-mentioned two kinds of hypothesis, also the situation that may occur equating:
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value, wall scroll SQL less than the quantity of the second preset reference value or maximum concurrent processing SQL less than the 3rd preset reference value, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the quantity that the maximum processing time of the first preset reference value, wall scroll SQL equals the second preset reference value and maximum concurrent processing SQL and equals the 3rd preset reference value, then do not change the maximum thread of application server connection pool.
Corresponding to top method embodiment, the present invention also provides a kind of optimization means of application server.
As shown in Figure 4, the optimization means of a kind of application server provided by the invention comprises:
Data acquisition module 100 is used for obtaining in real time the related data of application server processes Structured Query Language (SQL) SQL,
Wherein, described related data comprises: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Wherein, the processing time of described wall scroll SQL can for:
The maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL or the Preset Time section in the Preset Time section.
The related data that it will be appreciated by persons skilled in the art that SQL can also be other data, for example: the handled SQL type of application server.
Wherein, the preset reference value can artificially be set, and also can add up and/or calculate the preset reference value by the historical record of application server processes SQL.
Wherein, the processing time of wall scroll SQL can be the maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL in: the Preset Time section or the Preset Time section.
Data comparison module 200 is used for described related data and preset reference value are compared;
Thread Count changes module 300, is used in described related data reducing the maximum thread of application server connection pool during greater than the preset reference value, during less than the preset reference value, increases the maximum thread of application server connection pool in described related data.
In actual applications, when described related data equates with the preset reference value, can no longer change the maximum thread of application server connection pool.
Need to prove that the application server connection pool is a kind of equipment that belongs to middleware, can control the quantity that application server is wanted treatment S QL according to maximum thread is set.When the maximum thread of connection pool became big, application server institute SQL quantity to be processed became big; When the maximum thread of connection pool diminished, application server SQL quantity to be processed diminished.For fixing application server, its processing power is fixed, when application server institute SQL quantity to be processed more for a long time, the processing time of wall scroll SQL will be longer.
Be connected with database because application server is many, the behavior of database being inquired about by application server processes SQL, so the quantity of and/or application server concurrent processing SQL long when the time of application server processes SQL more for a long time, phenomenon of blocking can appear in database.So,, can think that stopping up appears in database when described dependency number during greater than the preset reference value.
The present invention is by using above technical scheme, the processing time and the preset reference value of the Structured Query Language (SQL) obtained in real time can be compared, and according to the automatic corresponding increase of comparative result or reduce the value of application server connection pool, to realize the Automatic Optimal of application server performance.
In actual applications, because each bar SQL might not be identical, so the processing time of wall scroll SQL possibility can not embody the performance of application server on higher degree.So, in other embodiments of the invention, can also obtain the related data of using server process SQL in the Preset Time section earlier, add up then and/or calculate, draw the characteristic of using server process SQL in the predetermined amount of time, as: the maximum processing time of the average handling time of wall scroll SQL, wall scroll SQL.Then described characteristic and preset reference value are compared, and corresponding change application server connection pool maximum thread, to reach the purpose that application server performance is optimized.
Certainly, the present invention other the device embodiment in, described data acquisition module 100 concrete configurations can for:
Under the stable situation of application server load, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value.
Wherein, the computing method of the average handling time of wall scroll SQL can for:
The time of using server process SQL in the Preset Time section is added up,, thereby draw the average handling time of wall scroll SQL then divided by using the quantity of server process SQL in the Preset Time section.
Under the situation of the average handling time of wall scroll SQL, the method to set up of preset reference value comprises in related data is the Preset Time section:
Under application server load stable case, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value, for the purpose of distinguishing, be called the first preset reference value.
It will be appreciated by persons skilled in the art that the application server load is stable refers to that promptly the quantity of application server concurrent processing SQL remains in certain scope, and number change is little.
Certainly, the present invention other the device embodiment in, described data acquisition module 100 specifically be provided with can for:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value.
Under the situation in the maximum processing time of wall scroll SQL, the method to set up of preset reference value can comprise in related data is the Preset Time section:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value, for the purpose of distinguishing, be called the second preset reference value.
In actual applications, because the amplitude of variation in the maximum processing time of wall scroll SQL is bigger than the average handling time of wall scroll SQL, so the reservation multiple in maximum processing time can be than the reservation multiple height of average handling time.
Certainly, the present invention other the device embodiment in, described data acquisition module 100 specifically be provided with can for:
Obtain the CPU quantity of application server, as the preset reference value, for the purpose of distinguishing, be called the 3rd preset reference value with the described CPU quantity of prearranged multiple.
The CPU quantity that it will be appreciated by persons skilled in the art that application server is one of key factor that influences application server processes SQL ability, and the CPU quantity of application server is many more, and the ability of its treatment S QL is big more.
Certainly, in other devices of the present invention embodiment, data acquisition module 100 concrete configurations can for: obtain the maximum processing time of application server processes wall scroll SQL and the average handling time of wall scroll SQL simultaneously, the average handling time of wall scroll SQL and the pairing first preset reference value compare, and the maximum processing time of wall scroll SQL and the pairing second preset reference value compare.
If the average handling time of wall scroll SQL greater than maximum processing time of the first preset reference value or wall scroll SQL greater than the second preset reference value, then reduce the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value and wall scroll SQL less than the second preset reference value, then increase the maximum thread of application server connection pool.
In actual applications, the situation that also may occur equating:
If the average handling time of wall scroll SQL equals the maximum processing time of the first preset reference value and wall scroll SQL less than the second preset reference value, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the second preset reference value less than the maximum processing time of the first preset reference value and wall scroll SQL, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the maximum processing time of the first preset reference value and wall scroll SQL and equals the second preset reference value, then do not change the maximum thread of application server connection pool.
Certainly, the present invention other the device embodiment in, data acquisition module 100 concrete configurations can for: obtain the maximum processing time of application server processes wall scroll SQL, the average handling time of wall scroll SQL and the quantity of maximum concurrent processing SQL simultaneously.The average handling time of wall scroll SQL and the pairing first preset reference value compare, the maximum processing time of wall scroll SQL and the pairing second preset reference value compare, and the quantity of maximum concurrent processing SQL and pairing the 3rd preset reference value compare.
If the average handling time of wall scroll SQL greater than maximum processing time of the first preset reference value, wall scroll SQL greater than the quantity of the second preset reference value or maximum concurrent processing SQL greater than the 3rd preset reference value, then reduce the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value, wall scroll SQL less than the quantity of the second preset reference value and maximum concurrent processing SQL less than the 3rd preset reference value, then increase the maximum thread of application server connection pool.
Getting rid of under the situation of above-mentioned two kinds of hypothesis, also the situation that may occur equating:
If the average handling time of wall scroll SQL less than maximum processing time of the first preset reference value, wall scroll SQL less than the quantity of the second preset reference value or maximum concurrent processing SQL less than the 3rd preset reference value, then increase the maximum thread of application server connection pool;
If the average handling time of wall scroll SQL equals the quantity that the maximum processing time of the first preset reference value, wall scroll SQL equals the second preset reference value and maximum concurrent processing SQL and equals the 3rd preset reference value, then do not change the maximum thread of application server connection pool.
For the convenience of describing, be divided into various unit with function when describing above the device and describe respectively.Certainly, when enforcement is of the present invention, can in same or a plurality of softwares and/or hardware, realize the function of each unit.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses all is difference with other embodiment.Especially, for device embodiment, because it is substantially similar in appearance to method embodiment, so describe fairly simplely, relevant part gets final product referring to the part explanation of method embodiment.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying creative work.
The present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by by communication network connected teleprocessing equipment execute the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
The above only is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. the optimization method of an application server is characterized in that, comprising:
Obtain the related data of application server processes Structured Query Language (SQL) SQL in real time,
Wherein, described related data comprises: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Described related data and preset reference value are compared,, then reduce the maximum thread of application server connection pool,, then increase the maximum thread of application server connection pool if less than the preset reference value if greater than the preset reference value.
2. method according to claim 1 is characterized in that, the processing time of described wall scroll SQL is:
The maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL or the Preset Time section in the Preset Time section.
3. method according to claim 2 is characterized in that, the method to set up of described preset reference value comprises:
Under application server load stable case, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value.
4. method according to claim 2 is characterized in that, the method to set up of described preset reference value comprises:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value.
5. method according to claim 1 is characterized in that, the method to set up of described preset reference value comprises:
Obtain the CPU quantity of application server, with the described CPU quantity of prearranged multiple as the preset reference value.
6. the optimization means of an application server is characterized in that, comprising:
Data acquisition module is used for obtaining in real time the related data of application server processes Structured Query Language (SQL) SQL,
Wherein, described related data comprises: the quantity of the processing time of wall scroll SQL or maximum concurrent processing SQL;
Data comparison module is used for described related data and preset reference value are compared;
Thread Count changes module, is used in described related data reducing the maximum thread of application server connection pool during greater than the preset reference value, during less than the preset reference value, increases the maximum thread of application server connection pool in described related data.
7. device according to claim 6 is characterized in that, the processing time of described wall scroll SQL is:
The maximum processing time of wall scroll SQL in the average handling time of wall scroll SQL or the Preset Time section in the Preset Time section.
8. device according to claim 7 is characterized in that, described data acquisition module concrete configuration is:
Under the stable situation of application server load, according to the historical record of treatment S QL, the average handling time of the server process that is applied wall scroll SQL, with the described average handling time of prearranged multiple as the preset reference value.
9. device according to claim 7 is characterized in that, described data acquisition module concrete configuration is:
Under the stable situation of application server load, according to the historical record of treatment S QL, the maximum processing time of the server process that is applied wall scroll SQL, with described maximum processing time of prearranged multiple as the preset reference value.
10. device according to claim 6 is characterized in that, described data acquisition module concrete configuration is:
Obtain the CPU quantity of application server, with the described CPU quantity of prearranged multiple as the preset reference value.
CN 201010549790 2010-11-18 2010-11-18 Method and device for optimizing application server Active CN102033784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010549790 CN102033784B (en) 2010-11-18 2010-11-18 Method and device for optimizing application server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010549790 CN102033784B (en) 2010-11-18 2010-11-18 Method and device for optimizing application server

Publications (2)

Publication Number Publication Date
CN102033784A true CN102033784A (en) 2011-04-27
CN102033784B CN102033784B (en) 2013-08-07

Family

ID=43886717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010549790 Active CN102033784B (en) 2010-11-18 2010-11-18 Method and device for optimizing application server

Country Status (1)

Country Link
CN (1) CN102033784B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779062A (en) * 2011-05-09 2012-11-14 阿里巴巴集团控股有限公司 Method and device for controlling number of threads accessing system resources
CN103164282A (en) * 2011-12-19 2013-06-19 中国移动通信集团安徽有限公司 Method and system of adjusting middleware service process maximum value
CN103326950A (en) * 2013-06-20 2013-09-25 交通银行股份有限公司 Bank card data flow control method and system
CN104573993A (en) * 2015-01-29 2015-04-29 北京京东尚科信息技术有限公司 Multi-process execution method and multi-process execution system
CN104809070A (en) * 2015-05-13 2015-07-29 上海新炬网络信息技术有限公司 Method for analyzing properties based on transaction type middleware of database
CN105260446A (en) * 2015-10-09 2016-01-20 上海瀚之友信息技术服务有限公司 Data query system and method
CN105740073A (en) * 2016-01-21 2016-07-06 浪潮(北京)电子信息产业有限公司 Method and apparatus for dynamically controlling quantity of operation system processes
CN103164282B (en) * 2011-12-19 2016-12-14 中国移动通信集团安徽有限公司 A kind of method and system adjusting transaction middleware service processes maximum number
CN108549592A (en) * 2018-03-19 2018-09-18 联动优势电子商务有限公司 A kind of monitoring method and monitoring device, application server of database connection pool
CN108665239A (en) * 2018-05-08 2018-10-16 平安普惠企业管理有限公司 Workflow processing method, device, computer equipment and storage medium
CN114996292A (en) * 2022-05-05 2022-09-02 北京联华信科技有限公司 Execution plan automatic change method, device, equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588316A (en) * 2004-06-29 2005-03-02 北京大学 Property optimizing method for applying server
CN1758606A (en) * 2004-10-08 2006-04-12 国际商业机器公司 Method and device for self managing connetion pool
CN1815469A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Database connection resource management method
CN101192228A (en) * 2006-12-01 2008-06-04 阿里巴巴公司 Database interactive processing method and system
CN101364185A (en) * 2008-09-02 2009-02-11 中国科学院软件研究所 Thread pool size self-adapting regulating method and concurrency control method applying server
CN101694632A (en) * 2009-10-19 2010-04-14 浪潮电子信息产业股份有限公司 Method for executing resource plans on demands and being applied to data base cluster system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588316A (en) * 2004-06-29 2005-03-02 北京大学 Property optimizing method for applying server
CN1758606A (en) * 2004-10-08 2006-04-12 国际商业机器公司 Method and device for self managing connetion pool
CN1815469A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Database connection resource management method
CN101192228A (en) * 2006-12-01 2008-06-04 阿里巴巴公司 Database interactive processing method and system
CN101364185A (en) * 2008-09-02 2009-02-11 中国科学院软件研究所 Thread pool size self-adapting regulating method and concurrency control method applying server
CN101694632A (en) * 2009-10-19 2010-04-14 浪潮电子信息产业股份有限公司 Method for executing resource plans on demands and being applied to data base cluster system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《计算机应用与软件》 20100131 杨开杰 等 线程池的多线程并发控制技术研究 第168页至第170页,第179页 1-10 第27卷, 第1期 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779062A (en) * 2011-05-09 2012-11-14 阿里巴巴集团控股有限公司 Method and device for controlling number of threads accessing system resources
CN103164282A (en) * 2011-12-19 2013-06-19 中国移动通信集团安徽有限公司 Method and system of adjusting middleware service process maximum value
CN103164282B (en) * 2011-12-19 2016-12-14 中国移动通信集团安徽有限公司 A kind of method and system adjusting transaction middleware service processes maximum number
CN103326950A (en) * 2013-06-20 2013-09-25 交通银行股份有限公司 Bank card data flow control method and system
CN103326950B (en) * 2013-06-20 2016-08-10 交通银行股份有限公司 A kind of bank card data flow control method and system
CN104573993A (en) * 2015-01-29 2015-04-29 北京京东尚科信息技术有限公司 Multi-process execution method and multi-process execution system
CN104809070A (en) * 2015-05-13 2015-07-29 上海新炬网络信息技术有限公司 Method for analyzing properties based on transaction type middleware of database
CN105260446B (en) * 2015-10-09 2019-07-05 上海瀚之友信息技术服务有限公司 A kind of data query system and method
CN105260446A (en) * 2015-10-09 2016-01-20 上海瀚之友信息技术服务有限公司 Data query system and method
CN105740073A (en) * 2016-01-21 2016-07-06 浪潮(北京)电子信息产业有限公司 Method and apparatus for dynamically controlling quantity of operation system processes
CN108549592A (en) * 2018-03-19 2018-09-18 联动优势电子商务有限公司 A kind of monitoring method and monitoring device, application server of database connection pool
CN108665239A (en) * 2018-05-08 2018-10-16 平安普惠企业管理有限公司 Workflow processing method, device, computer equipment and storage medium
CN108665239B (en) * 2018-05-08 2024-01-16 印嘉商用科技(深圳)有限公司 Workflow processing method, workflow processing device, computer equipment and storage medium
CN114996292A (en) * 2022-05-05 2022-09-02 北京联华信科技有限公司 Execution plan automatic change method, device, equipment and readable storage medium
CN114996292B (en) * 2022-05-05 2023-07-25 北京联华信科技有限公司 Automatic change method, device and equipment for execution plan and readable storage medium

Also Published As

Publication number Publication date
CN102033784B (en) 2013-08-07

Similar Documents

Publication Publication Date Title
CN102033784B (en) Method and device for optimizing application server
CN110806923B (en) Parallel processing method and device for block chain tasks, electronic equipment and medium
CN111738446B (en) Scheduling method, device, equipment and medium of deep learning reasoning engine
CN102567090B (en) The method and system of execution thread is created in computer processor
CN101464810A (en) Service program processing method and server
CN111258759B (en) Resource allocation method and device and electronic equipment
CN103345664A (en) Method and system for adaptation between workflow and task scheduling
CN108334408B (en) Code execution method and device, terminal equipment and computer readable storage medium
CN102594869A (en) Method and device for dynamically distributing resources under cloud computing environment
CN103455377A (en) System and method for managing business thread pool
CN102118261A (en) Method and device for data acquisition, and network management equipment
US20170031708A1 (en) System and Method for Multithreaded Processing
CN103150259A (en) Memory recovery method and device
CN108628671A (en) Method for scheduling task and device
CN103268247A (en) Method and device for executing task and adjusting number of remaining threads in thread pool
EP3147785A1 (en) Task processing method and device
CN103455489A (en) Method and system for rapidly constructing key performance indicators (KPIs) of enterprises
CN105912386A (en) Thread management method and system
CN106528065B (en) A kind of thread acquisition methods and equipment
CN105955827A (en) Method and device for allocating computational resource of processor
CN103902357A (en) Application program management system and method
CN102915344B (en) SQL (structured query language) statement processing method and device
CN103902364A (en) Physical resource management method and device and intelligent terminal
WO2024031931A1 (en) Priority queuing processing method and device for issuing of batches of requests, server, and medium
CN102629220A (en) Dynamic task allocation and management method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: CVIC SOFTWARE ENGINEERING CO., LTD.

Effective date: 20131227

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20131227

Address after: 250014 Shandong city of Ji'nan Province - Shandong Lixia District Road No. 41-1

Patentee after: CVIC Software Engineering Co., Ltd.

Address before: 250014 No. 41-1 Shandong Road, Shandong, Ji'nan

Patentee before: Shandong CVIC Software Engineering Co., Ltd.

Patentee before: CVIC Software Engineering Co., Ltd.