ulimit - recommended setting

ulimit - recommended setting

Post by Jan Tegtmeie » Thu, 18 Jan 2001 21:24:29



Hi Johan,

Quote:>What's the recommended setting for ulimit on a system running
>MySQL 3.23.27, Red Hat 7.0, and PHP which now and then
>when connecting with mysql_pconnect() produce the error:
>"Can't create a new thread (errno 11).
>If you are not out of available memory, you can consult the
>manual for a possible OS-dependent bug"

How many processes does the mysqld have when PHP tells you this?
You could use this command to monitor the current status by running:

mysqladmin -i 5 -u xxx -pyyy status

Quote:>core file size (blocks)     1000000
>data seg size (kbytes)      unlimited
>file size (blocks)          unlimited
>max locked memory (kbytes)  unlimited
>max memory size (kbytes)    unlimited
>open files                  1024
>pipe size (512 bytes)       8
>stack size (kbytes)         8192
>cpu time (seconds)          unlimited
>max user processes          2048
>virtual memory (kbytes)     unlimited

With these settings you won't be able to run much over 500 processes
because each process will need at least 2 filehandles to run a query
and the master-daemon will use a few filedescriptors too. Try a
"ulimit -n 8192" in your scripts for starting mysqld.

cu
  Jan Tegtmeier
  NetGate Internetservice / Germany

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

ulimit - recommended setting

Post by Johan Bj?r » Thu, 18 Jan 2001 20:20:17


One simple(?) question.

What's the recommended setting for ulimit on a system running MySQL 3.23.27,
Red Hat 7.0, and PHP which now and then when connecting with
mysql_pconnect() produce the error: "Can't create a new thread (errno 11).
If you are not out of available memory, you can consult the manual for a
possible OS-dependent bug"

The current ulimit -a is:

core file size (blocks)     1000000
data seg size (kbytes)      unlimited
file size (blocks)          unlimited
max locked memory (kbytes)  unlimited
max memory size (kbytes)    unlimited
open files                  1024
pipe size (512 bytes)       8
stack size (kbytes)         8192
cpu time (seconds)          unlimited
max user processes          2048
virtual memory (kbytes)     unlimited

As suggested by someone else the following is also set:

echo "8192" > /proc/sys/fs/file-max
echo "24576" > /proc/sys/fs/inode-max

MySQL variables are set to # of file descriptors/threads according to the
manual recommendations.

We would be interested in a competent consultant to help us with this,
because I'm 100% sure our system should be able to handle much more load
than the current, if it just would be correctly configured.

---
Johan Bj?rk

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

1. ulimit problem

Hi,

I've run myisampack to compress a table and am now trying to recreate the
index using myisamchk (as root) but I get an error 27.

# myisamchk -rq --sort-index --analyze --tmpdir=/proxydb/mysql/tmp
internet_usage.MYI
- check record delete-chain
- recovering (with sort) MyISAM-table 'internet_usage.MYI'
Data records: 30972875
- Fixing index 1
myisamchk: Error writing file '/proxydb/mysql/tmp/ST3hTDMa' (Errcode: 27)
myisamchk: error: 27 when fixing table
MyISAM-table 'internet_usage.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or
by not using the --quick (-q) flag
# perror 27
Error code  27:  A file cannot be larger than the value set by ulimit.

The ulimits are set as follows:

default:
        fsize = 2097151
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

root:
        fsize = -1
        core = -1
        cpu = -1
        data = -1
        rss = -1
        stack = -1
        nofiles = 4000

When I run myisamchk, is it running with root privilidges or as user mysql?
By the way this is a large enabled filesystem.

Thanks,

JS.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql

2. Poor Microsoft!

3. ulimit effects on mysql user?

4. xml definition

5. Can you recommend any good tutorials for MySQL with Dreamweaver/Windows XP?

6. Unique index/primary key case-insensitive?

7. Recommended Books

8. Thick Vs Thin clients

9. Can you recommend a database library?

10. Can anyone recommend a database library?

11. recommend access like db field creator for linux?

12. recommended install

13. Compile guide / needed /recommended versions solaris 8 Sparc