[SERVER-48349] Compact command execution Time is more Created: 21/May/20  Updated: 27/Oct/23  Resolved: 07/Jul/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: mohan mohan Assignee: Dmitry Agranat
Resolution: Community Answered Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 3.4.png     PNG File 3.6.png     Zip Archive MD3.4_Logs_DBSize.zip     Zip Archive MD3.6_Logs_DBSize.zip     Zip Archive diagnostic.data-1.zip     Zip Archive diagnostic.data.zip     Zip Archive diagnostic_Mdb3_4.data.zip     Zip Archive log-1.zip     Zip Archive log.zip     Zip Archive log_Mdb3_4.zip    
Participants:

 Description   

Dear Team,
We are using the compact command inorder to reduce the storage space of data and index. 

As we have upgraded MongoDB version from MongoDB-3.4.0 to MongoDB-3.6.17.

We observed that the command compact execution time is more with MongoDB-3.6  and it took very less time with MongoDB-3.4.

We need your Support to confirm that the execution time for 
compact command is more with MongoDB-3.6.

Below are the environment details

  1. OS: Windows 10, architecture: "x64", 
  2. Platform: "Java/AdoptOpenJDK/11.0.6"
  3. mongodb Journals are enabled by default
  4. Mongod server version: db version v3.6.17

Kindly confirm this.

Thanks & Regards

Rammohan



 Comments   
Comment by Dmitry Agranat [ 07/Jul/20 ]

Hi ram.pamudurthi@gmail.com,

As MongoDB 3.4 has reached EOL I will go ahead and close this issue. As a note, perhaps you might want to reach out to "Booster GUI" tool provider to validate if any bugs around compact command are present/fixed.

Regards,
Dima

Comment by mohan mohan [ 29/Jun/20 ]

Hi Dmitry,
Thank you for your support.
Based on provided data,  you have mentioned  that the CPMPACT command was not executed in MongoDB-3.4.
But to reproduce this issue I have executed the compact command in Mongo Booster GUI tool for each collection and observed that the compact command execution time is more with MongoDB-3.6  and it took very less time with MongoDB-3.4.. I have attached the DB logs and DB size before and after the compact command run.
Kindly let us know the root cause for this issue.
 
MD3.4_Logs_DBSize.zip
MD3.6_Logs_DBSize.zip
Thank you.
 
Regards,
Rammohan

Comment by Dmitry Agranat [ 11/Jun/20 ]

Apologies ram.pamudurthi@gmail.com, I posted my comment on June 4th but forgot to make it visible.

Comment by mohan mohan [ 11/Jun/20 ]

Hi Carl,

I am requesting you, kindly confirm any updates on this.

Thank you for your support.

 

Regards,

Rammohan

Comment by Dmitry Agranat [ 04/Jun/20 ]

Hi ram.pamudurthi@gmail.com, thank you for providing the requested information.

Based on the provided data, it appears that the compact command did not do anything in 3.4.0, at least not based on the internal diagnostic data. Meaning, no compact commands were executed on the MongoDB side. I understand that there are same logged operations inside mongod log but this might be another issue related to how we logged some commands in 3.4.

This might explain the difference in time execution.

Thanks,
Dima

Comment by mohan mohan [ 29/May/20 ]

Hi Carl,

Sorry for the incomplete information.

We observed that the compact command is taking less than one minute with MongoDB-3.4.

However I have provided the logs and diagnostic.data in attachment.

diagnostic_Mdb3_4.data.zip log_Mdb3_4.zip

Thank you for your support.

 

Thanks & Regards,

Rammohan

Comment by Carl Champain (Inactive) [ 28/May/20 ]

ram.pamudurthi@gmail.com,

Thanks for the logs and diagnostic.data!
It seems that the compact command took about 15 minutes to complete. Can you please tell me how long it took in 3.4 (if you could provide the logs it would be helpful)?

 

Comment by mohan mohan [ 28/May/20 ]

Hi Carl,

Thank you for the reply and considering my report.

I have attached the required log files for your investigation.

log.zipdiagnostic.data.zip

Thank you.

Regards,

Rammohan

Comment by Carl Champain (Inactive) [ 26/May/20 ]

Hi ram.pamudurthi@gmail.com,

Thank you for the report.
To help us investigate this behavior, can you please archive (tar or zip) the mongod.log files and the $dbpath/diagnostic.data directory (the contents are described here) and upload them to this support uploader location?

Please keep in mind that we’re unlikely to improve the compact command in 3.6 since it’s old, but we can take a look and see if anything obviously stands out. 

Kind regards,
Carl
 

 

Generated at Thu Feb 08 05:16:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.