Hi Steve,

Thanks for the suggestions.

Steve Lawrence wrote:
> We currently don't have a mechanism for stating the default rctls for all
> processes on a per-zone basis.
> 
> Are these apps still being started out of inittab in the zone?

Yes. These are apps from the largest database software maker ;)

> 
> If so, can you run a script from inittab or from /etc/rc0.d to run the
> commands:
> 
>   prctl -n process.max-file-descriptor -t basic -r -v <x> `pgrep -x init`
>   prctl -n process.max-file-descriptor -t priv -r -v <y> `pgrep -x init`
> 
> If you can run these commands before init starts your legacy applications,
> then they will inherit init's process.max-file-descriptor values.

This sounds like an approach we can use because we can't modify the apps 
themselves. The problem is that the app's daemons on startup call 
sysconf(3C) to get the max number of descriptors (fd_max) and close all 
descriptors from 0 to fd_max. This can take a very long time when, for 
example, fd_max is 2.15G!

> 
> I'm guessing that the rctl tuning is only desired for the legacy apps,
> and not for all processes started by init.
> 

This is correct.

Thanks,
Zoram

> The best thing to do would be to stop using inittab, and instead create a
> service for these legacy apps.  This service can be assigned to a project,
> and the project can specify the rctls as desired.  You could also start
> the legacy apps from an /etc/rc?.d script, and set the rctls in the script:
>   
> cat /etc/rc3.d/S99startlegacyapps
> #!/sbin/sh
>   prctl -n process.max-file-descriptor -t basic -r -v <x> $$
>   prctl -n process.max-file-descriptor -t priv -r -v <y> $$
>   <..start legacy applications...>
>   exit 0
> 
> -Steve L.
> 
> On Wed, Aug 01, 2007 at 07:44:51PM +0530, Zoram Thanga wrote:
>> Hi,
>>
>> Has anyone succeeded in setting the process.max-file-descriptor rctl on 
>> a per-zone level? Somewhat like making the
>>
>> set rlim_fd_cur=x
>> set rlim_fd_max=y
>>
>> entries in /etc/system? The setting must apply to all processes in a 
>> given zone, independently of the settings in the GZ or other NGZ's.
>>
>> At present max-file-descriptor is not a zone level rctl, and there are 
>> some *legacy* applications that are started out from inittab that 
>> wouldn't honor SRM project settings or start up before SRM settings are 
>> applied.
>>
>> Any ideas appreciated.
>>
>> Thanks,
>> Zoram
>> -- 
>> Zoram Thanga::Sun Cluster Development::http://blogs.sun.com/zoram
>> _______________________________________________
>> zones-discuss mailing list
>> zones-discuss@opensolaris.org


-- 
Zoram Thanga::Sun Cluster Development::http://blogs.sun.com/zoram
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to