[SERVER-4908] FileAllocator seems to take database lock. Is this needed? Created: 08/Feb/12 Updated: 29/Feb/12 Resolved: 09/Feb/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Hitoshi Asai | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | FileAllocator, lock | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
centos 5.6, 64bit, use 3 node replica, non sharding |
||
| Participants: |
| Description |
|
When FileAllocator worked, the whole of database seems to be locked during allocating physical data file. [FileAllocator] done allocating datafile /data/mongo/data/hoge1.5, size: 2047MB, took 21.081 secs On this time, read/write operation was queued and timed out. 1. creating database and collection at mongo console. That is worked fine. |
| Comments |
| Comment by Hitoshi Asai [ 09/Feb/12 ] |
|
our system uses ext3 and inserts data faster than pre-allocation finishes. |
| Comment by Eliot Horowitz (Inactive) [ 09/Feb/12 ] |
|
background file allocation is done without any lock if you are inserting data faster than pre-allocation can keep up, then there can be a pause if you need a new file to insert data. if allocation is taking that long - you probably are not a new enough file system. try xfs or ext4. |