Maximum Files in a directory

Hi,

Maximum how many files does QNX 4.25 allow in a particular directory? Is
there any max limit for number of files stored in root directory? What
limits total number of files in a directory?

Thanks,
Krupa

Krupa <krupah@hotmail.com> wrote:

Hi,

Maximum how many files does QNX 4.25 allow in a particular directory? Is
there any max limit for number of files stored in root directory? What
limits total number of files in a directory?

As far as I know there is no real maximum. Well, you probably have to
be able to fit all the dirents into 2G. (That would be about 20 million
entries.)

But, Fsys searches directory entries linearly – so the larger a directory
gets, the slower access is going to be, especially to later entries in
the directory. So, in practice you probably don’t want to exceed something
a lot smaller than the theoretical limit.

What sort of numbers were you look at? 100s? 1000s? More?

-David

QNX Training Services
dagibbs@qnx.com

Subj: QNX 4 Fsys limits

Max extents per file: 65,535
Max bytes per extent: 2,147,483,647 (2^31 - 1)
Max files per dir: 32,767
Max blocks per disk: 2,147,483,647
Max disk size (bytes): 1,099,511,627,776
Max file size (bytes): 2,147,483,647
Max open files: # i-nodes determines unique files

file descriptions determines calls

to open()
Max drivers: 4 plus built-in ramdisk
Max disks: 16 (physical disks inc. ramdisk,
not a count of partitions)
Max units: 32 (this is a count of physical disks
inc. ramdisk, partitions and mounted
filesystems)
Max chars in filename: 48
Max chars in pathname: 256
Max links to a file: 65,535
Min links to a file: 0 (file goes away when closed)

Default i-nodes: 2/3 # processes
Max i-nodes: hundreds (depends on other variables)
Min i-nodes: 1 (but you can’t do much)

Default file descr.: 2x # processes
Max file descriptions: see max i-nodes :slight_smile:
Min file descriptions: 1 (but you can’t do much)

This was for QNX 4.24, wether or not it still applies for 4.25, I cannot say.

E.





Krupa <krupah@hotmail.com> wrote:

Hi,

Maximum how many files does QNX 4.25 allow in a particular directory? Is
there any max limit for number of files stored in root directory? What
limits total number of files in a directory?

Thanks,
Krupa

Hardware Support Account <hw@qnx.com> wrote:

Max chars in filename: 48

But it is much better to have filenames containing at most 16 characters,
I think.

Andy

andy@microstep-mis.com wrote:

Hardware Support Account <> hw@qnx.com> > wrote:
Max chars in filename: 48

But it is much better to have filenames containing at most 16 characters,
I think.

It would be faster, but demand for longer filenames is also a factor. :slight_smile:

E.

\

Andy

Hardware Support Account <hw@qnx.com> wrote:

Subj: QNX 4 Fsys limits

Max extents per file: 65,535
Max bytes per extent: 2,147,483,647 (2^31 - 1)
Max files per dir: 32,767

This was for QNX 4.24, wether or not it still applies for 4.25, I cannot say.

QNX 4.25 has some improvements:
I found directory with approximately 130,000 files.
But it was quite ineffective to work with the directory:
rm -rf dir/* after 1 hour deleted 60,000 of them (it was a slow EIDE disc).
Some programs (ezfm, …) just SIGSEGV-ed.

\

Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:matog@microstep-mis.sk

Hardware Support Account <hw@qnx.com> wrote:

andy@microstep-mis.com > wrote:
Hardware Support Account <> hw@qnx.com> > wrote:
Max chars in filename: 48

But it is much better to have filenames containing at most 16 characters,
I think.

It would be faster, but demand for longer filenames is also a factor. > :slight_smile:

Of course, but to have size of /.inodes 20M (and as far I know there is no
possibility to provide its defragmentation though the files with the
long name have been already deleted) is a blind alley on usual hw.

E.

Andy

<matog@microstep-mis.sk> wrote in message
news:9orr3l$ujq$1@charon.microstep-mis.sk

Hardware Support Account <> hw@qnx.com> > wrote:
Subj: QNX 4 Fsys limits

Max extents per file: 65,535
Max bytes per extent: 2,147,483,647 (2^31 - 1)
Max files per dir: 32,767

This was for QNX 4.24, wether or not it still applies for 4.25, I cannot
say.

QNX 4.25 has some improvements:
I found directory with approximately 130,000 files.
But it was quite ineffective to work with the directory:
rm -rf dir/* after 1 hour deleted 60,000 of them (it was a slow EIDE
disc).
Some programs (ezfm, …) just SIGSEGV-ed.

Fsys -a -d10 would GREATLY speed up rm operation at the risk
of corrupted disk in case of power failure.


Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk

Mario Charest <mcharest@clipzinformatic.com> wrote:

matog@microstep-mis.sk> > wrote in message
news:9orr3l$ujq$> 1@charon.microstep-mis.sk> …
Hardware Support Account <> hw@qnx.com> > wrote:
Subj: QNX 4 Fsys limits

Max extents per file: 65,535
Max bytes per extent: 2,147,483,647 (2^31 - 1)
Max files per dir: 32,767

This was for QNX 4.24, wether or not it still applies for 4.25, I cannot
say.

QNX 4.25 has some improvements:
I found directory with approximately 130,000 files.
But it was quite ineffective to work with the directory:
rm -rf dir/* after 1 hour deleted 60,000 of them (it was a slow EIDE
disc).
Some programs (ezfm, …) just SIGSEGV-ed.

Fsys -a -d10 would GREATLY speed up rm operation at the risk
of corrupted disk in case of power failure.

Fsys -a -d2 was used in the mentioned case.

Can -a option to increase risk of corrupted filesystem ?
Or you meant that -d10 causes it only.

Andy


Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk

Can -a option to increase risk of corrupted filesystem ?

Yes

Or you meant that -d10 causes it only.

Yes and no, in my experience it mosttl affect the number
of files you may loose, in this case 10 seconds of changes.
It doesn’t mean the file system will be be corrupted.

On my development machine I used -d120, it’s not
very good for real-time behavior but it increases compile
time. It also serves as an undelete feature. If I do
rm * by mistake, I have ~120 seconds to turn of the computer
before the operation is commited to disk.

Andy


\

Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk

We have increased the cache size, “-c 16M” on Fsys and this has greatly
increased times saving files, compiling, and copying files. But on systems
in the field we reduce this to 1M.

On some systems in the field we have a UPS attached an have turned on
“-a” and “-d” options with good success. Our systems can generate over
500MB of data per day on over 20 - 50 files. I’m waiting to see how
these systems run after a year or so, most of the ones in the field are only
a few months old.

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9ov321$bbd$1@inn.qnx.com

Can -a option to increase risk of corrupted filesystem ?

Yes

Or you meant that -d10 causes it only.

Yes and no, in my experience it mosttl affect the number
of files you may loose, in this case 10 seconds of changes.
It doesn’t mean the file system will be be corrupted.

On my development machine I used -d120, it’s not
very good for real-time behavior but it increases compile
time. It also serves as an undelete feature. If I do
rm * by mistake, I have ~120 seconds to turn of the computer
before the operation is commited to disk.


Andy


\

Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk

\

“Ivan Bannon” <ivan.bannon@rjginc.com> wrote in message
news:9ovbvp$gjb$1@inn.qnx.com

We have increased the cache size, “-c 16M” on Fsys and this has greatly
increased times saving files, compiling, and copying files.
^^^^^^

Should it read decrease :wink:

I use 64M of cache. The drawback is if I manage to generate
64M of data, after -d120 seconds everything get’s flush
to the HD. But since this is done by Fsys it is not perform
at the priority of the client that wrote the data, but at
the priority of the Fsys.eide. Like I said this is bad
for real-time, if Fsys.eide would use DMA or if it would
perform the flushing at the priority of the client that generated the data,
that would be much better.

I was told a while ago that QNX6 does flush cache data based
on client priority (i’m not sure if that is true)

But on systems in the field we reduce this to 1M.

On some systems in the field we have a UPS attached an have turned on
“-a” and “-d” options with good success. Our systems can generate over
500MB of data per day on over 20 - 50 files. I’m waiting to see how
these systems run after a year or so, most of the ones in the field are
only
a few months old.

“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9ov321$bbd$> 1@inn.qnx.com> …


Can -a option to increase risk of corrupted filesystem ?

Yes

Or you meant that -d10 causes it only.

Yes and no, in my experience it mosttl affect the number
of files you may loose, in this case 10 seconds of changes.
It doesn’t mean the file system will be be corrupted.

On my development machine I used -d120, it’s not
very good for real-time behavior but it increases compile
time. It also serves as an undelete feature. If I do
rm * by mistake, I have ~120 seconds to turn of the computer
before the operation is commited to disk.


Andy


\

Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk



\

Mario Charest (mcharest@clipzinformatic.com) wrote:


: > Can -a option to increase risk of corrupted filesystem ?

: Yes

: > Or you meant that -d10 causes it only.

: Yes and no, in my experience it mosttl affect the number
: of files you may loose, in this case 10 seconds of changes.
: It doesn’t mean the file system will be be corrupted.

: On my development machine I used -d120, it’s not
: very good for real-time behavior but it increases compile

“decreases” right?

: time. It also serves as an undelete feature. If I do
: rm * by mistake, I have ~120 seconds to turn of the computer
: before the operation is commited to disk.

LOL!
-RK

Robert Krten, PARSE Software Devices; email my initials at parse dot com
Consulting, Systems Architecture / Design, Drivers, Training, QNX 4 & Neutrino
Check out our new QNX 4 and Neutrino (QRTP) books at http://www.parse.com/
Wanted PDP-8/9/10/11/12 Systems/documentation/spare parts! Will trade books!

: On my development machine I used -d120, it’s not
: very good for real-time behavior but it increases compile

“decreases” right?

Yeah yeah, funny I pointed the same mistaking in someone else’s post :wink:

: time. It also serves as an undelete feature. If I do
: rm * by mistake, I have ~120 seconds to turn of the computer
: before the operation is commited to disk.

LOL!

So far that saved me from heart failure twice in 10 years :wink:

-RK

Robert Krten, PARSE Software Devices; email my initials at parse dot com
Consulting, Systems Architecture / Design, Drivers, Training, QNX 4 &
Neutrino
Check out our new QNX 4 and Neutrino (QRTP) books at > http://www.parse.com/
Wanted PDP-8/9/10/11/12 Systems/documentation/spare parts! Will trade
books!

Mario Charest <mcharest@clipzinformatic.com> wrote:

: On my development machine I used -d120, it’s not
: very good for real-time behavior but it increases compile

“decreases” right?

Yeah yeah, funny I pointed the same mistaking in someone else’s post > :wink:


: time. It also serves as an undelete feature. If I do
: rm * by mistake, I have ~120 seconds to turn of the computer
: before the operation is commited to disk.

LOL!

So far that saved me from heart failure twice in 10 years > :wink:

Actually also of use is the “disk_raw” utility from /usr/free. If you’ve
done a large rm, well, what it does is looks at the directory entries,
but ignores the bit that marks a file as deleted. If you haven’t done
anything after the rm that will write new stuff to the disk (and
possibly re-use blocks now marked free for those deleted files) you can
generally get everything back.

-David

QNX Training Services
dagibbs@qnx.com

You are most correct “decreased” is the word. Thanks. :slight_smile:
Ivan

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9ovclp$gv2$1@inn.qnx.com

“Ivan Bannon” <> ivan.bannon@rjginc.com> > wrote in message
news:9ovbvp$gjb$> 1@inn.qnx.com> …
We have increased the cache size, “-c 16M” on Fsys and this has greatly
increased times saving files, compiling, and copying files.
^^^^^^

Should it read decrease > :wink:

I use 64M of cache. The drawback is if I manage to generate
64M of data, after -d120 seconds everything get’s flush
to the HD. But since this is done by Fsys it is not perform
at the priority of the client that wrote the data, but at
the priority of the Fsys.eide. Like I said this is bad
for real-time, if Fsys.eide would use DMA or if it would
perform the flushing at the priority of the client that generated the
data,
that would be much better.

I was told a while ago that QNX6 does flush cache data based
on client priority (i’m not sure if that is true)

But on systems in the field we reduce this to 1M.

On some systems in the field we have a UPS attached an have turned on
“-a” and “-d” options with good success. Our systems can generate over
500MB of data per day on over 20 - 50 files. I’m waiting to see how
these systems run after a year or so, most of the ones in the field are
only
a few months old.

“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9ov321$bbd$> 1@inn.qnx.com> …


Can -a option to increase risk of corrupted filesystem ?

Yes

Or you meant that -d10 causes it only.

Yes and no, in my experience it mosttl affect the number
of files you may loose, in this case 10 seconds of changes.
It doesn’t mean the file system will be be corrupted.

On my development machine I used -d120, it’s not
very good for real-time behavior but it increases compile
time. It also serves as an undelete feature. If I do
rm * by mistake, I have ~120 seconds to turn of the computer
before the operation is commited to disk.


Andy


\

Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk





\