Sponsored Content
Operating Systems AIX What is the limitation in AIX? Post 302804009 by bakunin on Tuesday 7th of May 2013 11:55:12 PM
Old 05-08-2013
What DGPickett means is the following:

A directory is quite similar to a file and the bigger a file gets the longer it takes the system to read it, which is to be expected. Run a "grep" against a file of 10GB and it will take longer than against a file of 1k size.

Let us consider the case where you issue a command

Code:
grep regexp /path/to/some/file

What happens? Before "grep" can start its work the operating system has to find out which file to open. So it looks in the directory "/path/to/some" and searches there for the inode of "file". A "directory" now is nothing else than a (quite unsorted) list of file names and inode-numbers. The longer this list is the longer it will take the take the OS to search it and find the inode it is interested in.

Usually you won't notice even this difference because the OS uses otherwise unused parts of the memory to buffer such information. This is part of the "file system cache": the system won't read the directory information from disk, but use the copy it has already stored in memory. As memory is much faster than disk this will speed up things considerably. But as the directory gets bigger and bigger and memory is a limited resource at some point the list might not fit in memory any more additionally hurting the speed with which this list is searched.

Bottom line: even if there are no theoretical limits there is some practical limit to directory sizes. This practical limit is pushed as hardware gets faster and memory keeps getting bigger, disks getting faster, etc.., but it still remains.

To split a large directory there is no "standard tool" like there is "split" for files. Just create new directories and use "mv" to move files from one to the other. A command like

Code:
mv /path/to/file /other/path

will physically move a file only of the directories "/path/to" and "/other/path" are not part of the same filesystem. If they are it is simply a matter of removing the directory information from the one list and putting it into the other. It will take the same time regardless of file size, because the file itself is not touched, just "file metadata" - information about files instead of files themselves.

I hope this clears things up.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find limitation

Hi , i'm trying to use "find "command with "-size "option but i encounter 2gb file limitation. Can you confirm this limitation ? Is there a simple way to do the same thing ? My command is : <clazz01g-notes01>/base/base01 # find /base/base01 -name '*.nsf' -size +5242880000c -exec ls... (2 Replies)
Discussion started by: Nicol
2 Replies

2. HP-UX

HP-UX 11i - File Size Limitation And Number Of Folders Limitation

Hi All, Can anyone please clarify me the following questions: 1. Is there any file size limitation in HP-UX 11i, that I can able to create upto certain size of file (say 2 GB) and not more then that???? 2. At max. how many files we can able to keep inside a folder???? 3. How many... (2 Replies)
Discussion started by: sundeep_mohanty
2 Replies

3. Shell Programming and Scripting

Limitation of ls command

Hi, Iam using an alias to get the file count from one directory using normal ls command like ls file*|wc -l.If my file increases more than 35,000 ,my alias is not working.It shows that arg list too long. is that can be limitation of ls or problem in alias? I would appreciate if anyone can... (2 Replies)
Discussion started by: cskumar
2 Replies

4. Shell Programming and Scripting

Is this a bug or a limitation?

Hi, I'm having a problem with a while loop syntax that doesn't seem to loop correctly. TODAY=`date +%d%m%Y` while read hostname #for hostname in $(cat $CONFIG) do OUTFILE=/tmp/health_check.$hostname.$TODAY if then touch $OUTFILE func_header else rm $OUTFILE ... (2 Replies)
Discussion started by: gilberteu
2 Replies

5. AIX

AIX 5.3 : Limitation to 1 telnet session for some users

Hi, I search the way to limit, for a group on a AIX 5.3, one telnet session by user (Simultaneous). I search a lot in /etc/security but the only way found is with the pam authentication that i not use. No solution found also in smit menu... Thanks for your help. (2 Replies)
Discussion started by: feilong
2 Replies

6. Shell Programming and Scripting

SED on AIX Limitation

Hello, I have a problem running a script created in ksh for Linux (Tested on Debian 5.0, Ubuntu Server 10.04 and RHEL 5.1), it works properly. :b: I trying to pass it to a AIX 5.3. :wall: The problem is the character limit of 256 on a command system and SED. I need to cut the contents of... (8 Replies)
Discussion started by: nemesis.spa
8 Replies

7. AIX

Limitation for SFTP on AIX number of sessions

Hello. I am using AIX 6 and If wish to receive more than 500 files via SFTP, I get some time out errors. Could you please advise where is the limit for number of concurrent transfers setup in AIX Box or what is the limit and can that be changed? Many Thanks (3 Replies)
Discussion started by: panchpan
3 Replies

8. Shell Programming and Scripting

Limitation on rm command

Hi all, does any one know ,if there is any limitation on rm command limitation referes here as a size . Ex:when my script try to rum rm command which have size of nearly 20-22 GB ..CPU load gets high ? if anyone know the relation of CPU load and limitation of rm command . (8 Replies)
Discussion started by: niteshagrawal06
8 Replies

9. UNIX for Dummies Questions & Answers

Limitation in addition

whats wrong with this addition? Whats the maximum number of digits can be handled? pandeeswaran@ubuntu:~/Downloads$ const=201234454654768979799999 pandeeswaran@ubuntu:~/Downloads$ let new+=const pandeeswaran@ubuntu:~/Downloads$ echo $new -2152890657037557890 pandeeswaran@ubuntu:~/Downloads$ (4 Replies)
Discussion started by: pandeesh
4 Replies

10. AIX

AIX lpar bad disk I/O performance - 4k per IO limitation ?

Hi Guys, I have fresh new installed VIO 2.2.3.70 on a p710, 3 physical SAS disks, rootvg on hdisk0 and 3 VIO clients through vscsi, AIX7.1tl4 AIX6.1tl9 RHEL6.5ppc, each lpar has its rootvg installed on a LV on datavg (hdisk2) mapped to vhost0,1,2 There is no vg on hdisk1, I use it for my... (1 Reply)
Discussion started by: frenchy59
1 Replies
FASTRM(1)						    InterNetNews Documentation							 FASTRM(1)

NAME
fastrm - Quickly remove a list of files SYNOPSIS
fastrm [-de] [-u|-uN] [-s|-sM] [-c|-cI] base-directory DESCRIPTION
fastrm reads a list of either file names or storage API tokens, one per line, from its standard input and removes them. Storage API tokens are removed via the SMcancel() interface. If a file name is not an absolute path name, it is considered to be relative to base-directory as given on the command line. The base- directory parameter must be a simple absolute pathname (it must not contain multiple consecutive slashes or references to the special directories "." or ".."). fastrm is designed to be faster than the typical "| xargs rm" pipeline when given a sorted list of file names as input. For example, fas- trm will usually chdir(2) into a directory before removing files from it, meaning that if its input is sorted, most names passed to unlink(2) will be simple names. This can substantially reduce the operating system overhead from directory lookups. fastrm assumes that its input is valid and that it is safe to call unlink(2) on every file name it is given. As a safety measure, however, fastrm when running as root will check with stat(2) that a file name doesn't specify a directory before removing it. (In some operating systems, root is allowed to unlink directories, even directories which aren't empty, which can cause file system corruption.) The input to fastrm should always be sorted -- or even better be in the order file names are output by find(1) -- if speed is an issue and the input isn't solely storage API tokens. (It deals fine with unsorted input, but is unlikely to be any faster in that case than a simple "xargs rm" command.) Sorting may even slightly speed up the removal of storage API tokens due to caching effects, since sorting will tend to keep all of the tokens from a particular storage method together. Various additional optimizations for removing files can be turned on and/or tuned with options (see below). Which options will be most effective depends heavily on the underlying structure of the file system, the way in which directories are stored and searched, and similar often underdocumented operating system implementation details. The more sophisticated the underlying operating system and file system, the more likely that it will already perform the equivalent of these optimizations internally. OPTIONS
-d Don't remove any files. Instead, print a list of the files that would be removed to standard output. Each line contains either the current directory of fastrm at the time it would do the unlink and the relative path name it would pass to unlink(2) as two fields sep- arated by whitespace and a "/", the absolute path name (as a single field) that would be passed to unlink(2), or the string "Token" and the storage API token that would be removed. -e Treat an empty input file as an error. This is most useful when fastrm is last in a pipeline after a preceding sort(1) command, ensur- ing that fastrm will fail if the sort fails. -cI Controls when fastrm calls chdir(2). If the number of files to be unlinked from a given directory is at least I, then fastrm will change to that directory before unlinking those files. Otherwise, it will use either the absolute path names or a path name relative to the current directory (whichever is likely more efficient). The I parameter is optional; if just -c is given, -c1 is assumed, which will cause fastrm to always chdir before calling unlink(2). The default is -c3. Use -c0 to prevent fastrm from ever using chdir(2). -sM When -s is given and the number of files to remove in a directory is greater than M, rather than remove files in the order given, fas- trm will open the directory and read it, unlinking files in the order that they appear in the directory. On systems with a per-process directory cache or that use a linear search to find files in a directory, this should make directory lookups faster. The M parameter is optional; if just -s is given, -s5 is assumed. When this option is in effect, fastrm won't attempt to remove files that it doesn't see in the directory, possibly significantly speed- ing it up if most of the files to be removed have already been deleted. However, using this option requires fastrm to do more internal work and it also assumes that the order of directory listings is stable in the presence of calls to unlink(2) between calls to read- dir(3). This may be a dangerous assumption with some sophisticated file systems (and in general this option is only useful with file systems that use unindexed linear searches to find files in directories or when most of the files to be removed have already been deleted). This optimization is off by default. -uN Specifying this option promises that there are no symbolic links in the directory tree from which files are being removed. This allows fastrm to make an additional optimization to its calls to chdir(2), constructing a relative path using "../.." and the like to pass to chdir(2) rather than always using absolute paths. Since this reduces the number of directory lookups needed with deeply nested direc- tory structures (such as that typically created by traditional news spool storage), it can be a significant optimization, but it breaks horribly in the presence of symbolic links to directories. When -u is given, fastrm will use at most N levels of ".." segments to construct paths. N is optional; if just -u is given, -u1 is assumed. This optimization is off by default. fastrm also accepts -a and -r options, which do nothing at all except allow you to say "fastrm -usa", "fastrm -ussr", or "fastrm -user". These happen to often be convenient sets of options to use. EXIT STATUS
fastrm exits with a status of zero if there were no problems, and an exit status of 1 if something went wrong. Attempting to remove a file that does not exist is not considered a problem. EXAMPLES
fastrm is typically invoked by INN via expirerm(8) using a command like: fastrm -e /usr/local/news/spool/articles < expire.list To enable all optimizations and see the affect on the order of removal caused by -s, use: fastrm -d -s -e -u ~news/spool/articles < expire.list If your file system has indexed directory lookups, but you have a deeply nested directory structure, you may want to use a set of flags like: fastrm -e -u3 ~news/spool/articles < expire.list to strongly prefer relative paths but not to use readdir(2) to order the calls to unlink(2). You may want to edit expirerm(8) to change the flags passed to fastrm. NOTES
fastrm defers opening the storage subsystem or attempting to parse any INN configuration files until it encounters a token in the list of files to remove. It's therefore possible to use fastrm outside of INN as a general fast file removal program. HISTORY
fastrm was originally written by kre@munnari.oz.au. This manual page rewritten in POD by Russ Allbery <rra@stanford.edu> for InterNetNews. $Id: fastrm.1,v 1.1.2.1 2001/02/03 07:38:44 rra Exp $ SEE ALSO
expirerm(8) 3rd Berkeley Distribution INN 2.3.2 FASTRM(1)
All times are GMT -4. The time now is 04:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy