You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Dirkjan Ochtman <di...@ochtman.nl> on 2010/09/17 10:10:13 UTC

Database-level statistics/on-disk file names

Hi there,

I'd like to be able to determine how much disk space the index for a
certain ddoc takes. Is there any easy way of doing that?

Relatedly, would it be possible to rejigger the on-disk layout a
little bit to make the filenames easier to understand? For example, we
now have:

/foo.couch
/.foo_design/<big-hash>.view
/.foo_temp

It would seem nicer to have, e.g.

/foo/data.couch
/foo/users-<big-hash>.view
/foo/.temp

(Unless maybe you want to be able to rename design docs without having
to re-index, but I think even that would be manageable.) This would
also make index size fairly transparent.

Semi-relatedly, has anyone taken a swing at reflecting /_stats into a
Futon page?

Cheers,

Dirkjan

Re: Database-level statistics/on-disk file names

Posted by Zachary Zolton <za...@gmail.com>.
I'm +1 on having a Futon _stats page. We should put nice explanations
of the individual stats in there too so I don't have to look them up
every time!

—Zach

On Fri, Sep 17, 2010 at 3:10 AM, Dirkjan Ochtman <di...@ochtman.nl> wrote:
> Hi there,
>
> I'd like to be able to determine how much disk space the index for a
> certain ddoc takes. Is there any easy way of doing that?
>
> Relatedly, would it be possible to rejigger the on-disk layout a
> little bit to make the filenames easier to understand? For example, we
> now have:
>
> /foo.couch
> /.foo_design/<big-hash>.view
> /.foo_temp
>
> It would seem nicer to have, e.g.
>
> /foo/data.couch
> /foo/users-<big-hash>.view
> /foo/.temp
>
> (Unless maybe you want to be able to rename design docs without having
> to re-index, but I think even that would be manageable.) This would
> also make index size fairly transparent.
>
> Semi-relatedly, has anyone taken a swing at reflecting /_stats into a
> Futon page?
>
> Cheers,
>
> Dirkjan
>

Re: Database-level statistics/on-disk file names

Posted by Jan Lehnardt <ja...@apache.org>.
On 17 Sep 2010, at 10:10, Dirkjan Ochtman wrote:

> Hi there,
> 
> I'd like to be able to determine how much disk space the index for a
> certain ddoc takes. Is there any easy way of doing that?

 curl $COUCH/db/_design/name/_info
{"name":"db","view_index":{"signature":"431517a0e7decdaa8a97d0dc9ffd7412","language":"javascript","disk_size":51,"updater_running":true,"compact_running":false,"waiting_commit":false,"waiting_clients":0,"update_seq":0,"purge_seq":0}}

The `signature` field corresponds to the .db_design/`signature`.view file.

--

> Relatedly, would it be possible to rejigger the on-disk layout a
> little bit to make the filenames easier to understand? For example, we
> now have:
> 
> /foo.couch
> /.foo_design/<big-hash>.view
> /.foo_temp
> 
> It would seem nicer to have, e.g.
> 
> /foo/data.couch
> /foo/users-<big-hash>.view
> /foo/.temp

I understand that it may seem nice to have everything related to a 
databases in a single directory, for say moving things around but 
practically, the current format is just as easy to script as the proposed 
version. What other reasons do you see that would improve with 
the proposed version?

In addition, creating and deleting databases would no longer be 
atomic (mkdir & fopen), but I'm not sure that's a hard requirement. 
I know the current model includes some very finicky details about 
deleting and renaming files on Windows which would need to be 
taken into consideration when changing the filesystem structure.

> (Unless maybe you want to be able to rename design docs without having
> to re-index, but I think even that would be manageable.)

This is a required feature :)

> This would also make index size fairly transparent.

I don't see how that's any different with either or any filesystem layout.

> Semi-relatedly, has anyone taken a swing at reflecting /_stats into a
> Futon page?

Oh I'd *love* to see that :)

Cheers
Jan
--