* [OT] memory issue with GNU find
@ 2002-10-24 15:43 Philippe Gramoullé
2002-10-24 15:49 ` Nikita Danilov
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Philippe Gramoullé @ 2002-10-24 15:43 UTC (permalink / raw)
To: reiserfs
Hi,
Sorry to be a little off topic here but here is the issue:
For legal reasons we need to list all files on a filer (reiserfs FS so not
_that_ offtopic :o).
Problem is that the filer is about 400Go and number of files according to
/proc/fs/reiserfs/*/oidmap is about 20 Million files.
From what we've read and seen , find is eating up all memory to the point that
the filer start to swap and then crashes.
Would anyone know how to do that without bring the filer to its knees in terms
of memory ?
thanks,
Philippe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-24 15:43 [OT] memory issue with GNU find Philippe Gramoullé
@ 2002-10-24 15:49 ` Nikita Danilov
2002-10-24 15:54 ` Chris Mason
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Nikita Danilov @ 2002-10-24 15:49 UTC (permalink / raw)
To: Philippe Gramoullé; +Cc: reiserfs
Philippe Gramoullé writes:
> Hi,
>
> Sorry to be a little off topic here but here is the issue:
>
> For legal reasons we need to list all files on a filer (reiserfs FS so not
> _that_ offtopic :o).
>
> Problem is that the filer is about 400Go and number of files according to
> /proc/fs/reiserfs/*/oidmap is about 20 Million files.
>
> >From what we've read and seen , find is eating up all memory to the point that
> the filer start to swap and then crashes.
>
> Would anyone know how to do that without bring the filer to its knees in terms
> of memory ?
ls -R ?
>
> thanks,
>
> Philippe
Nikita.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-24 15:43 [OT] memory issue with GNU find Philippe Gramoullé
2002-10-24 15:49 ` Nikita Danilov
@ 2002-10-24 15:54 ` Chris Mason
2002-10-24 16:30 ` Philippe Gramoullé
2002-10-24 15:54 ` Fabien Combernous
[not found] ` <200210251900.33613.russell@coker.com.au>
3 siblings, 1 reply; 8+ messages in thread
From: Chris Mason @ 2002-10-24 15:54 UTC (permalink / raw)
To: Philippe Gramoullé; +Cc: reiserfs
On Thu, 2002-10-24 at 11:43, Philippe Gramoullé wrote:
> Hi,
>
> Sorry to be a little off topic here but here is the issue:
>
> For legal reasons we need to list all files on a filer (reiserfs FS so not
> _that_ offtopic :o).
>
> Problem is that the filer is about 400Go and number of files according to
> /proc/fs/reiserfs/*/oidmap is about 20 Million files.
>
> >From what we've read and seen , find is eating up all memory to the point that
> the filer start to swap and then crashes.
>
> Would anyone know how to do that without bring the filer to its knees in terms
> of memory ?
Interesting, find should not do that unless you're trying to get it to
sort the results somehow.
Exactly how are you running the find?
-chris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-24 15:43 [OT] memory issue with GNU find Philippe Gramoullé
2002-10-24 15:49 ` Nikita Danilov
2002-10-24 15:54 ` Chris Mason
@ 2002-10-24 15:54 ` Fabien Combernous
2002-10-24 16:31 ` Philippe Gramoullé
[not found] ` <200210251900.33613.russell@coker.com.au>
3 siblings, 1 reply; 8+ messages in thread
From: Fabien Combernous @ 2002-10-24 15:54 UTC (permalink / raw)
To: Philippe Gramoullé; +Cc: reiserfs
Do you have test tree ?
Philippe Gramoullé wrote:
> Hi,
>
> Sorry to be a little off topic here but here is the issue:
>
> For legal reasons we need to list all files on a filer (reiserfs FS so not
> _that_ offtopic :o).
>
> Problem is that the filer is about 400Go and number of files according to
> /proc/fs/reiserfs/*/oidmap is about 20 Million files.
>
> From what we've read and seen , find is eating up all memory to the point that
> the filer start to swap and then crashes.
>
> Would anyone know how to do that without bring the filer to its knees in terms
> of memory ?
>
> thanks,
>
> Philippe
>
--
Fabien COMBERNOUS - IT Engineer
eProcess - Parc Club du Millénaire Batiment n° 6
1025 rue Henri Becquerel - 34000 Montpellier FRANCE
http://www.eprocess.fr - +33 (0)4 67 13 84 50
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-24 15:54 ` Chris Mason
@ 2002-10-24 16:30 ` Philippe Gramoullé
0 siblings, 0 replies; 8+ messages in thread
From: Philippe Gramoullé @ 2002-10-24 16:30 UTC (permalink / raw)
To: reiserfs-list
On 24 Oct 2002 11:54:45 -0400
Chris Mason <mason@suse.com> wrote:
|
| Exactly how are you running the find?
Like this:
find /path-to-list -type f ! -user root
Philippe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-24 15:54 ` Fabien Combernous
@ 2002-10-24 16:31 ` Philippe Gramoullé
0 siblings, 0 replies; 8+ messages in thread
From: Philippe Gramoullé @ 2002-10-24 16:31 UTC (permalink / raw)
To: reiserfs-list
On Thu, 24 Oct 2002 17:54:47 +0200
Fabien Combernous <fcombernous@eprocess.fr> wrote:
| Do you have test tree ?
Yes we have couple ones, which are actual old producation data.
So tests would be pretty accurate, to what we would have in production.
Philippe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
[not found] ` <200210251900.33613.russell@coker.com.au>
@ 2002-10-25 18:23 ` Philippe Gramoullé
2002-10-25 22:28 ` Russell Coker
0 siblings, 1 reply; 8+ messages in thread
From: Philippe Gramoullé @ 2002-10-25 18:23 UTC (permalink / raw)
To: Russell Coker; +Cc: reiserfs
Hi,
On Fri, 25 Oct 2002 19:00:33 +0200
Russell Coker <russell@coker.com.au> wrote:
| One issue I noticed with find is that the amount of memory required is
| propertional to the length of the maximum path name. If you have a very deep
| tree of subdirectories then the amount of memory taken becomes significant.
Are you aware of a find variant that would be memory limited ? :
If memory usage goes up , then at a certain point, commit everything in RAM to a file
, free up memory, and continue like this again and again.
| It's easy to create a set of nested directories that crash find (it's a good
| local DOS attack).
|
| while /bin/true ; do
| mkdir foo
| cd foo
| done
Users don't have shell access but they could do it over FTP indeed. We already found cases of such very
nested directory.
thanks,
Philippe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OT] memory issue with GNU find
2002-10-25 18:23 ` Philippe Gramoullé
@ 2002-10-25 22:28 ` Russell Coker
0 siblings, 0 replies; 8+ messages in thread
From: Russell Coker @ 2002-10-25 22:28 UTC (permalink / raw)
To: Philippe Gramoullé; +Cc: reiserfs
On Fri, 25 Oct 2002 20:23, Philippe Gramoullé wrote:
> | One issue I noticed with find is that the amount of memory required is
> | propertional to the length of the maximum path name. If you have a
> | very deep tree of subdirectories then the amount of memory taken
> | becomes significant.
>
> Are you aware of a find variant that would be memory limited ? :
No.
> If memory usage goes up , then at a certain point, commit everything in RAM
> to a file , free up memory, and continue like this again and again.
That could be done, then there's always the issue of disk space. For your
example of a NAS device it might not be such an issue. For a situation of a
small machine and a DOS attack then putting a long chain of directories and a
large file at the end could make things really difficult for recovery!
Also this still wouldn't make the following work:
find /tmp/junk -exec rm {} \;
> | It's easy to create a set of nested directories that crash find (it's
> | a good local DOS attack).
> |
> | while /bin/true ; do
> | mkdir foo
> | cd foo
> | done
>
> Users don't have shell access but they could do it over FTP indeed. We
> already found cases of such very nested directory.
When I was running my SE Linux play machine (public root password and a
challenge to the world to hack it) someone did that to it. Since then I've
been meaning to write a program to remove a directory tree of arbitary depth
in O(N) time where N is the depth.
--
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/ My home page
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-10-25 22:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-24 15:43 [OT] memory issue with GNU find Philippe Gramoullé
2002-10-24 15:49 ` Nikita Danilov
2002-10-24 15:54 ` Chris Mason
2002-10-24 16:30 ` Philippe Gramoullé
2002-10-24 15:54 ` Fabien Combernous
2002-10-24 16:31 ` Philippe Gramoullé
[not found] ` <200210251900.33613.russell@coker.com.au>
2002-10-25 18:23 ` Philippe Gramoullé
2002-10-25 22:28 ` Russell Coker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.