Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Limit database size and show how much space is left
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Octavian Covalschi  
View profile   Translate to Translated (View Original)
 More options Jul 3 2012, 1:54 pm
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Tue, 3 Jul 2012 12:54:36 -0500
Local: Tues, Jul 3 2012 1:54 pm
Subject: Limit database size and show how much space is left

Hi,

Is %subj% even possible?

Right now I'm limiting by using --quota and --quotaFiles, which works in a
way, but I'm not sure  how much space I've got left... is there a way to
implement this? I need to make a small pie chart to display that.

The only solution I'm thinking is to use db.stats() and "fileSize". So,
fileSize would be 100%, but dataSize would be the actual used...

Is there a better approach?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Matulef  
View profile   Translate to Translated (View Original)
 More options Jul 3 2012, 2:37 pm
From: Kevin Matulef <matu...@10gen.com>
Date: Tue, 3 Jul 2012 11:37:09 -0700 (PDT)
Local: Tues, Jul 3 2012 2:37 pm
Subject: Re: Limit database size and show how much space is left

Unfortunately there's no built in flag to cap the total database size. As
you've discovered, the --quota option will limit the number of data files
and hence the total filesize.  But figuring out the remaining space is a
little tricky, since some of the space in the datafiles is for indexes.
 Also, if you're deleting documents, then fragmentation in the data files
might mean that not all of the remaining space is usable.  fileSize minus
dataSize will give you a rough estimate of the remaining space, but it
won't be strictly accurate, so should be taken with a grain of salt.  .  

-Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Octavian Covalschi  
View profile   Translate to Translated (View Original)
 More options Jul 3 2012, 2:56 pm
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Tue, 3 Jul 2012 13:56:02 -0500
Local: Tues, Jul 3 2012 2:56 pm
Subject: Re: [mongodb-user] Re: Limit database size and show how much space is left

OK, looks like I need a different approach.

Is db.stats() an expensive operation? Would it impact performance if I'll
run it say, every 1min?

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Octavian Covalschi  
View profile   Translate to Translated (View Original)
 More options Jul 3 2012, 3:05 pm
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Tue, 3 Jul 2012 14:05:45 -0500
Local: Tues, Jul 3 2012 3:05 pm
Subject: Re: [mongodb-user] Re: Limit database size and show how much space is left

Never mind, I just found an older message where Scott has written: "It
takes a read lock, and has to calculate some numbers from the extents; it
is not a very costly operation. "

So, I think I'll be running a cronjob script to get current data size...

Thanks!

On Tue, Jul 3, 2012 at 1:56 PM, Octavian Covalschi <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »