Read about postgresql performance tuning parameters, The latest news, videos, and discussion topics about postgresql performance tuning parameters from alibabacloud.com
efficiency is reduced and deprecated.
Use of StringTokenizer:StringTokenizer is the JDK's own string segmentation tool, because there is no regular match, so faster, you can see the following source code:StringTokenizer just uses the properties of the string itself to slice it.
StringBuffer and StringBuilder:
The difference: StringBuffer is thread-safe, all methods of manipulating strings do synchronized operations, and StringBuilder is not thread-safe, so stringbuffer
Windows 2000 TCP Performance Tuning tips
Carl HarrisCommunications Network servicesvirginia tech
I was dismayed by the rather dismal TCP Performance in Win2000, especially for FTP up/downloads to distant sites, where the round-trip time (RTT) is nearly triple-digit. being a Unix bigot of sorts, I also found it amusing to watch my Win2000 machine dribble a downlo
level of most tasks has been boosted; see if the uptime of the entire spark job is shortenedBut be careful not to get the cart before the horse, the localization level is improved, but because of a lot of waiting time, the spark operation time increases, it is still not adjusted.Spark.locality.wait, default is 3s; can be changed to 6s,10sBy default, the following 3 wait lengths are the same as the one above, all 3sSpark.locality.wait.processSpark.locality.wait.nodeSpark.locality.wait.rackNew Sp
better choice. The last one on the hardware problem is CPU capability, which has a great impact on dynamic content sites, the more dynamic content requirements higher.The following are the performance configuration parameters that affect Apache:Timeout 300Specifies the number of seconds that the site responds. If the data has not been received or sent over this period of time, the connection will be discon
value is used to buffer data sent or received by TCP later.Note! The default values of rmem_max and wmem_max are 128 KB. In most cases, they do not need to be modified. The default values are also good for web or dns servers. However, when you feel a significant delay, you can modify the following parameters to increase the memory overhead.
# Echo 'Net. core. rmem_max = 12582912 '>/etc/sysctl. conf
#
Query performance tuning is a big topic, where the technology involved is very broad, but we can generally divide it into the following levels:
1. Reduce data access. The related technique is to create an appropriate index that converts time-consuming operations such as full table scans, index scans (scan), to index lookups (seek). Establish the correct index, can make the database query
testConsider increasing the spread of read pressure from the server, another scenario is that the max_connections value in the MySQL configuration file is too small:Mysql> Show variables like ' max_connections ';+-----------------+-------+| variable_name | Value |+-----------------+-------+| max_connections | 256 |+-----------------+-------+The maximum number of connections for this MySQL server is 256, then query the maximum number of connections the server responds to:Mysql> show global statu
manager (Row-level Manager) to adjust the optimized SQL statements.
Adjusting server memory allocation memory allocation is optimized in the process of information system operation. Depending on the health of the database, the database administrator can not only adjust the data buffers, log buffers, and shared pools of the database system global area (SGA area), but also adjust the size of the program global Area (PGA area).
Adjusting hard disk I/O This step is done before the information sys
. Memory: total system memory size = work memory size * Work size = spark_worker_memory * spark_worker_instances;
CPU: Total number of tasks in the system = number of jobs × Number of cores occupied by work = spark_worker_instances * spark_worker_cores, calculation of task concurrency, memory allocation, tuning parameters:
Spark_worker_instances = 4
Spark_worker_cores = 3
Spark_worker_memory = 6g
CPU (12 co
://myprofi.sourceforge.net/ MySQL Network protocol sniffer tool-Mysqlsniffer Http://hackmysql.com/mysqlsniffer MySQL performance diagnostics and tuning related books: "High performance MySQL Second Edition" Optimized MySQL 10 parameters for database performance (1), Max_c
= 0.0049876712328767sSecond: Average loading time for each class, 34.498/9484 = 0.0036374947279629sAs you can see, there are some performance improvements in how muchGiven that eclipse is running for a long time, the other possible adjustments are as follows:(1) Close System.GC ()(2) Improved JIT compilation of some code in eclipse(3) Optimize the garbage collector to reduce the time that garbage collection causes the application not to respondfor (1
1 , JAVA Performance Tuning-Move the Try/catch block out of the loopIt is said that the Try/catch block into the circulation body, will greatly affect performance. The use of the Try/catch module makes the Java virtual machine do a lot of extra work. It's like saying to everyone, "Hey, man, there may be snakes on the road." So he heard the man had to hand with a
transaction will write the log, but will not perform the brush operation. The log file is brushed on a per-second schedule. Note that there is no guarantee that 100% per second will be brushed to disk, depending on the scheduling of the process.# each time a transaction commits, the data is written to the transaction log, where the write is only called the file system, and the filesystem is cached, so this write does not guarantee that the data has been written to the physical disk# The default
JVM Performance Analysis and Tuning
1) reasonably configure Parameters
Jvm memory = heap memory + non-heap memory
Heap memory = new generation + Old Generation = 1 Eden zone + 2 vivo VO zones
Non-heap memory = persistent generation + code Cache
-Server: server mode. This parameter is placed at the beginning of the configuration item.
-Xms: the initial heap size.
set-up value. The goal is to mitigate the effects of excessive procedures and therefore not buildDisable these settings globally. There is one more thing to note about Max_execution_time: It represents the CPU time of the process, not the absolute time. So a progressiveA program that runs large amounts of I/O and a small number of computations may run far more than Max_execution_time. This is also max_input_time can be greater thanThe reason for Max_execution_time.The number of log records that
, Running-------------------+-----------------+-------+------------- +--------------------Maxscale> list SerUnknown or missing option for the list command. Valid Sub-commands is:Clients List all clientsDcbs List All DcbsFilters List All FiltersListeners List all listenersModules List all currently loaded modulesMonitors List all monitorsServices List all the servicesServers List all serversSessions List all sessionsThreads List Polling ThreadsCommands List Registered commandsMaxscale> quit 4 tes
, indicating that there are too many table scans, it is likely that the index is not built, and that increasing the read_buffer_size value will have some benefits, but it is best not to exceed 8MB.3.3 Key_buffer_sizeKey_buffer_size is one of the most influential parameters for MyISAM table performance, and the following is a configuration of the primary storage engine server with MyISAM:Mysql> Show variable
mount option can effectively improve performance if external storage is used.13. Adjust Linux file descriptor limitsLinux limits the number of file descriptors that any process can open, with the default limit of 1024 per process, which may hinder benchmarking clients (such as Httperf and Apachebench) and the Web server itself from getting the best performance, with one process per connection for Apache, S
not perform the brush operation. The log file is brushed on a per-second schedule. Note that there is no guarantee that 100% per second will be brushed to disk, depending on the scheduling of the process.# each time a transaction commits, the data is written to the transaction log, where the write is only called the file system, and the filesystem is cached, so this write does not guarantee that the data has been written to the physical disk# The default value of 1 is to ensure complete acid. O
statements to reduce the cost of committing a transaction;Use cluster when extracting multiple records from an index;Use limit when extracting part of a record from a query result;Use pre-compiled queries (Prepared query);Use analyze to maintain accurate optimization statistics;Regular use of VACUUM or pg_autovacuumDelete indexes first when making large amounts of data changes (then rebuilding indexes)2, program ExperienceCheck the program, whether the use of connection pool, if not used, as so
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.