Hi Kevin, thanks for help. I double to check the info and redo again, still can't change max memory for sybase. here is what I did:
1. change size of /dev/shm to 14G
vi /etc/fstab
2. remount /dev/shm
mount -o remount /dev/shm
3. change shmmax:
/sbin/sysctl -w kernel.shmmax=17674797056
/sbin/sysctl -p
4. Reboot linux:
init 6
After reboot, here is info:
[root@mysyb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 12G 2.6G 8.8G 23% /
/dev/sda1 251M 19M 220M 8% /boot
none 14G 0 14G 0% /dev/shm
/dev/sdb1 30G 8.4G 20G 30% /home
tmpfs 2.1G 0 2.1G 0% /db/oe/tempdb
[root@mysyb ~]# grep "kernel.shmmax" /etc/sysctl.conf
# kernel.shmmax = 10737418240
# kernel.shmmax=14738890752
kernel.shmmax = 17674797056
[root@mysyb ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# kernel.shmmax = 10737418240
kernel.shmmni = 4096
kernel.shmall = 2097152
# kernel.shmmax=14738890752
kernel.shmmax = 17674797056
[root@mysyb ~]# ipcs -la
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 17260544
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
5. start sybase ASE. max memory is 4000000 at this point
6. change max memory:
isql
1> sp_configure memory
2> go
Msg 17411, Level 16, State 1:
Server 'MYSYB', Procedure 'sp_configure', Line 214:
Configuration option is not unique.
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
----------- -------------------- ----------
additional network memory 0 0 0
0 bytes dynamic
allocate max shared memory 0 0 1
1 switch dynamic
compression memory size 0 152 0
0 memory pages(2k) dynamic
engine memory log size 0 2 0
0 memory pages(2k) dynamic
heap memory per user 4096 0 4096
4096 bytes dynamic
lock shared memory 0 0 0
0 switch static
max memory 45056 8000002 4000001
4000001 memory pages(2k) dynamic
memory alignment boundary 2048 0 2048
2048 bytes static
memory per worker process 1024 66 4096
4096 bytes dynamic
messaging memory 400 0 400
400 memory pages(2k) dynamic
shared memory starting address 0 0 0
0 not applicable static
total logical memory 32768 7620028 3810014
3810074 memory pages(2k) read-only
total physical memory 0 8000002 0
4000001 memory pages(2k) read-only
(1 row affected)
An additional 379854 K bytes of memory is available for reconfiguration. This is
the difference between 'max memory' and 'total logical memory'.
(return status = 1)
then try to change max memory
28> sp_configure 'max memory', 4000100
29> go
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
----------- -------------------- ----------
max memory 45056 80002000 40001000
40001000 memory pages(2k) dynamic
(1 row affected)
Configuration option changed. The SQL Server need not be rebooted since the
option is dynamic.
Changing the value of 'max memory' does not increase the amount of memory
Adaptive Server uses.
(return status = 0)
message:
00:00000:00007:2014/04/08 14:55:22.39 server Configuration file '/opt/sybase/ASE-12_5/LIFESYB.cfg' has been written and the previous version has been renamed to '/opt/sybase/ASE-12_5/LIFESYB.398'.
00:00000:00007:2014/04/08 14:55:22.39 server The configuration option 'max memory' has been changed by 'sa' from '5000000' to '4000001'.
00:00000:00007:2014/04/08 14:55:39.56 server Configuration file '/opt/sybase/ASE-12_5/LIFESYB.cfg' has been written and the previous version has been renamed to '/opt/sybase/ASE-12_5/LIFESYB.399'.
00:00000:00007:2014/04/08 14:55:39.57 server The configuration option 'max memory' has been changed by 'sa' from '4000001' to '4000100'.
00:00000:00007:2014/04/08 14:55:39.57 kernel Allocating a shared memory segment of size 202752 bytes.
01:00000:00007:2014/04/08 14:55:39.58 kernel Attempt to attach shared memory (id 131073) at address 0x2c7e12b000, with flags 0 failed
01:00000:00007:2014/04/08 14:55:39.58 kernel Cannot attach shared memory : error = 22 (Invalid argument)
01:00000:00007:2014/04/08 14:55:39.58 kernel os_attach_region: shmat(131073): Invalid argument
01:00000:00007:2014/04/08 14:55:39.58 kernel kbattach: couldn't attach to server region 0