Query (table 300 million data):
Simultaneous connection number op/s3 8K5 10K8 16K20K25K32K40K48K57KThe memory even index cannot be completely lowered:
Cache:data = 1:10
Query (table 300 million data):
Simultaneous connection number op/s3 3.4K5 4.5K8 9.3K11K14K20K24K25K34K(Click to view larger image)The index is all in memory:Cache:data is 4:10The index is not all in memoryCache:data is 1:10
Memory is large enough, the CPU is the bottleneck, the better the CPU
of data is about 1 K.
Remember that the method of this test is to generate 100 million data in memory before performing the insert operation. Fortunately, the memory of the test machine is large enough to save so much data.
3. Insert data into the database in the following four modes, and when each 1000 data is inserted, the time of the moment is written to a fixed file:
A) specify _ID as the MD5 value of 1–100,000,000 in M
Traditional SQL pagingIn traditional SQL paging, almost no row_number exists in all solutions. For scenarios that require various sorting and complex queries, row_number is a killer. In addition, the time stamp is usually used for paging loading by poll/push on the current web. These two types of pages can be said to be generic, and even the pages generated by Linq are row_number. The latter is the best both in terms of performance and complexity, bec
The topic is not very accurate, because the database does not provide paging , ranking and other functions, providing only data access, page ranking these are our database-based practical cases only. However, whether it is Redis or MongoDB, there are usually some common ways to do paging and ranking. This article introduces some test data to show you the performance difference between Redis and
default setting, there are two kinds of setting method and level, one is by adding –slowms boot parameter configuration. The second is to invoke Db.setprofilinglevel with the second argument:
Db.setprofilinglevel (level, slowms)
db.setprofilinglevel (1, 10);
2. Query Profiling Records
Unlike MySQL's slow query log, the MongoDB profile record is directly present in the system DB, and the record location is System.profile, so we'll just h
performance and business to set), so set a big meaningless. If you set a reasonable value, you reach this value and MongoDB the new connection request to avoid being dragged down by too many connections.2.indexcounters:btree:misses index of the number of misses, and the ratio of hits to consider whether the index is correctly established. You see my "missratio": 3.543930204420982e-7, very healthy bar. So t
First of all, I use the situation:
The first used memcache, a server-side cache of key-value pairs, used to store some commonly used data that is not very large, but that requires rapid response
Then, in another place, Redis is used, and then the next Redis is studied. A look, shows that they installed the PHP extension, because there is a server on the Redis service side, their own local is not installed, in fact, the usage and memcache basically the same, may be a few parameters are differen
Use Yii2-mongodb in the YII2 inside the main to improve which piece of performance?
Reply content:
Use Yii2-mongodb in the YII2 inside the main to improve which piece of performance?
MongoDB is a NoSQLMySQL is the traditional dbAs for the
Tags: MongoDB performance optimizationMongoDB Linux performance optimization: https://docs.mongodb.com/manual/administration/production-notes/#allocate-sufficient-ram-and-cpuPerformance optimization:1. Close the Atime storage volume that contains the database files.2, according to the recommendations in the Ulimit reference, the file descriptor limit,-n User proc
, "IsEOF": 1, "Invalidates": 0, "Direction": "Forward", "Docsexamined": 866283 }, "TS": Isodate ("2016-06-04t03:57:10.206z"), "Client": "127.0.0.1", "AllUsers": [ ], "User": ""}Use the following command to view the latest recordsDb.system.profile.find (). Sort ({$natural:-1})There is also a more concise way to viewShow profileThis command can view the last 5 recordsThe information content provided by profile is explainedTS: When the command i
When a new Web machine node is added to the project, the performance of its MongoDB cluster is found to be impacted, at the peak of the request, and the MongoDB response time becomes very long.
Monitoring found that the number of connections MongoDB at peak times reached around 1100~1500, which resulted in considerabl
When $ or and sort () are used in MongoDB, a solution with poor query performance is mentioned in the previous article. when $ or and sort () are used in MongoDB, query performance may be poor. for details, refer to mongodb's plan. this bug may be modified in version 2.5.w. I encountered this problem in my project, and
In MongoDB, you can use the Db.collection.explain ("executionstats") statement to analyze query performance.
Create the table inventory in MongoDB and insert the test data, the initial data in addition to the ID field is not indexed.
{"_id": 1, "item": "F1", type: "Food", quantity:500}
{"_id": 2, "item": "F2", type: "Food", quantity:100}
{"_id": 3, "item": "P1"
In YII2, which one of the main performance can be improved by using yii2-mongodb? In YII2, which one of the main performance can be improved by using yii2-mongodb?
Reply content:
In YII2, which one of the main performance can be improved by using yii2-
MongoDB comes with a web interface monitor.Configuration is simple, only need to add parameters at boot time:--httpinterface or write httpinterface=true to the configuration file to restart. Enter in the browser: Ip:mongodb port number +1000 For example, the database port is 20011, the monitoring page is: ip:21011/export/mongodb/bin/mongod-f/export/mongodb/conf/m
Dotnet core uses MongoDB for high-performance Nosql database operations. mongodbnosql
I haven't written a Blog for a long time. I watched the open-source Java Community drool every day, and I was so confused that I finally waited for the official release of dotnet core in March,
Looking at the dotnet community, it is also a thriving phenomenon. I don't want to bind Windows. I believe that the spring of dotn
indexes in test table
Db.test.fropIndexes ();
Delete the name index from the test table
Db.test.dropIndex ({name:1});
To parse an SQL statement using the index condition command:
Db.test.find (). explain ();
Performance optimization:
Explain execution plan
MongoDB provides a explain command to learn how a query request is handled by the system. The explain command provides a good view of how the system u
Although many open-source tools use plug-ins or other methods to monitor the internal performance provided by these open-source components (the so-called internal performance is the data obtained by the STAT command class provided by these open-source components ), however, both deployment and expansion are troublesome. In fact, it takes 1-2 days to implement such a tool, and it is also very convenient to s
Recently busy to transfer a project from MySQL to MongoDB, in the process of importing old data, encountered some twists and turns, made a lot of mistakes, but also learned a lot of knowledge, so recorded.
The company specially equipped with several high-performance server for this project, exclusively dual quad core Hyper-threading CPU, plus 32G of memory, operation and maintenance personnel after the in
; otherwise, the machine memory is too small, resulting in frequent swap writes. In this case, you need to upgrade the memory or expand
Locked % The percentage of lock time. Try to keep it below 50%.
Idx Miss % index Miss percentage. If the index is too high, check whether the index is missing.
Q t | r | w when MongoDB receives too many commands and the database is locked and cannot be executed, it adds the commands to the queue. This column
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.