[GRASS-dev] i.spectral limited to 400 files

Glynn Clements glynn at gclements.plus.com
Fri Apr 18 15:12:20 PDT 2014


Markus Neteler wrote:

> The next limit would be the operating system. Default Linux allows
> 1024 files to be opened, which can be increased in
> /etc/security/limits.conf

Note that, in 7.0, each raster map requires two open files: one for
the cell/fcell file, one for the null bitmap.

FWIW, on my system (Gentoo, nothing in limits.conf), the default soft
limit is 1024 while the default hard limit is 4096, so the user can
increase the soft limit to 4096 with "ulimit -n 4096" in the shell.

Nikos Alexandris wrote:

> Aren't there, however, any important side-effects in altering this limit?  
> There must be a (security?) reason for the number 2^10.

The limits are just to prevent a process from (accidentally or
deliberately) consuming too much memory. The descriptor table is in
kernel memory, and can't be swapped to disk.

Yann Chemin wrote:

> In Ubuntu, I could expand the number of opened files by:
...
> and reboot

A reboot shouldn't be necessary. Changes to limits.conf should take
effect for any subsequent logins.

A hard limit can't be increased for any existing non-root processes,
or those descended from them.

Increasing a hard limit requires root privilege (or at least the
CAP_SYS_RESOURCE capability), so the limits have to be set by the
program which manages the login (login, xdm, sshd, etc) after the user
has identified themself (so it knows which limits to set) but before
the process changes its ownership from root to the logged-in user.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list