From owner-freebsd-questions Tue Jun 27 7:20:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from liberty.bulinfo.net (liberty.bulinfo.net [212.72.195.7]) by hub.freebsd.org (Postfix) with SMTP id 5DB8937B88D for ; Tue, 27 Jun 2000 07:20:13 -0700 (PDT) (envelope-from krassi@bulinfo.net) Received: (qmail 76324 invoked from network); 27 Jun 2000 14:19:59 -0000 Received: from pythia.bulinfo.net (HELO bulinfo.net) (212.72.195.5) by liberty.bulinfo.net with SMTP; 27 Jun 2000 14:19:59 -0000 Message-ID: <3958B7F7.225ADFCE@bulinfo.net> Date: Tue, 27 Jun 2000 17:19:36 +0300 From: Krassimir Slavchev X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: Lowell Gilbert , freebsd-questions@freebsd.org Subject: Re: Memory usage? References: <395743C5.9E321A7F@bulinfo.net> <444s6f8e9k.fsf@lowellg.ne.mediaone.net> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------msE4B4BAC393D2E079746BD2AD" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a cryptographically signed message in MIME format. --------------msE4B4BAC393D2E079746BD2AD Content-Type: multipart/alternative; boundary="------------8D0EC25CBC0C3D955424FB2B" --------------8D0EC25CBC0C3D955424FB2B Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Lowell Gilbert wrote: > Krassimir Slavchev writes: > > > I use FreeBSD 3.4 (128Mb RAM and 150Mb swap) and have problem with perl. > > > > Some older perl scripts executed from apache server eat memory in a few > > minutes. > > I get: > > /kernel: swap_pager: out of swap space > > and other processes died with coredump. > > I rewrite this perl scripts and solve the problem. > > > > How can I limit max memory usage per a single process? It is possible? > > Process limits are available, and are usually set by login classes. > See the man page for login.conf. Yes, but limits applied if "user" use login. If I do su "user" or start any process as "user", limits have no effect. How can set limits to "user"? In my case I want to set memory limits to user nobody which execute perl. Best Regards -- Krassimir Slavchev Bulinfo Ltd. krassi@bulinfo.net (+359-2)963-3652 http://www.bulinfo.net (+359-2)963-3764 --------------8D0EC25CBC0C3D955424FB2B Content-Type: text/html; charset=koi8-r Content-Transfer-Encoding: 7bit  
Lowell Gilbert wrote:
Krassimir Slavchev <krassi@bulinfo.net> writes:

> I use FreeBSD 3.4 (128Mb RAM and 150Mb swap) and have problem with perl.
>
> Some older perl scripts executed from apache server eat memory in a few
> minutes.
> I get:
> /kernel: swap_pager: out of swap space
> and other processes died with coredump.
> I rewrite this perl scripts and solve the problem.
>
> How can I limit max memory usage per a single process? It is possible?

Process limits are available, and are usually set by login classes.
See the man page for login.conf.

Yes, but limits applied if "user" use login. If I do su "user" or start any process
as "user", limits have no effect.
How can set limits to "user"?
In my case I want to set memory limits to user nobody which execute perl.

Best Regards

-- 
 Krassimir Slavchev           Bulinfo Ltd.
 krassi@bulinfo.net           (+359-2)963-3652
 http://www.bulinfo.net       (+359-2)963-3764
  --------------8D0EC25CBC0C3D955424FB2B-- --------------msE4B4BAC393D2E079746BD2AD Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIHwQYJKoZIhvcNAQcCoIIHsjCCB64CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC Bb0wggKhMIICCqADAgECAgMCdTowDQYJKoZIhvcNAQEEBQAwgZQxCzAJBgNVBAYTAlpBMRUw EwYDVQQIEwxXZXN0ZXJuIENhcGUxFDASBgNVBAcTC0R1cmJhbnZpbGxlMQ8wDQYDVQQKEwZU aGF3dGUxHTAbBgNVBAsTFENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25h bCBGcmVlbWFpbCBSU0EgMTk5OS45LjE2MB4XDTAwMDQxOTEwMzAzN1oXDTAxMDQxOTEwMzAz N1owRDEfMB0GA1UEAxMWVGhhd3RlIEZ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3PgAjlSIE 4WrkisV4hag8hfUegEKvedZt9onKbS8c0spXXebIBCA8F13rSi+FUd++DP90G0erSmi9eVUm o4SXVuvJUBaiXsGs+kHa6+sDSSnnaVICsutQQpR8ErxTsrs6P4xJA3PTV5Du --------------msE4B4BAC393D2E079746BD2AD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message