[SERVER-14129] Use fsync instead of msync for SmartOS Created: 02/Jun/14  Updated: 11/Jul/16  Resolved: 04/Sep/14

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

Type: Improvement Priority: Critical - P2
Reporter: Bruce Lucas (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: community-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Participants:

 Description   

On SmartOS msync is implemented in a very inefficient manner - it has to scan every page of the mapped region to determine which files to sync. This uses a lot of CPU time for large dbs and

  • on 2.4 can cause pauses in the app due to a lock held while doing the background flush
  • on 2.6 can cause pauses in the app during background flush due to CPU contention

On the other hand fsync of the underlying file descriptor is much more efficient, doing only the work necessary to flush the dirty pages.



 Comments   
Comment by Githook User [ 29/Aug/14 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-14129: Use fsync instead of msync for Solaris
Branch: master
https://github.com/mongodb/mongo/commit/746e8835b0b841235b767628d6ae0382a85bdab0

Comment by Githook User [ 29/Aug/14 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-14129: Use fsync instead of msync for Solaris
Branch: master
https://github.com/mongodb/mongo/commit/b983d2b0858507009c1ef1589853cf9aec8dba33

Generated at Thu Feb 08 03:33:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.