리눅스 분류
공유메모리 shared memory 변경 방법 좀 알려주세요
작성자 정보
- 최환서 작성
- 작성일
컨텐츠 정보
- 3,170 조회
- 1 댓글
- 0 추천
- 목록
본문
공유메모리 shared memory 변경 방법 좀 알려주세요
레드햇 9.0 입니다.
free 명령어로 해보니
total used free shared buffers cached
Mem: 1030328 710652 319676 0 151472 392232
-/+ buffers/cache: 166948 863380
Swap: 2096440 3872 2092568
이렇게 나옵니다.
shared 가 0 이라는 건 현재 사용량이 아니고 설정된 값인게 맞는 거죠?
shared memory 512 정도 설정을 해야 하는 데
shared memory 변경하는 방법 좀 알려주세요.
그럼 좋은 하루 되세요~
관련자료
-
이전
-
다음
댓글 1
최환서님의 댓글
- 최환서
- 작성일
자답
[root@linux tools]# grep MemTotal /proc/meminfo
MemTotal: 159728 kB
[root@linux tools]# bc -q
159728 * 1024 / 2
81780736
quit
[root@linux tools]# echo 81780736 > /proc/sys/kernel/shmmax
[root@linux tools]# cat >> /etc/sysctl.conf
# 물리적 메모리량의 반정도 할당
kernel.shmmax = 81780736
[root@linux tools]#
[root@linux tools]# grep MemTotal /proc/meminfo
MemTotal: 159728 kB
[root@linux tools]# bc -q
159728 * 1024 / 2
81780736
quit
[root@linux tools]# echo 81780736 > /proc/sys/kernel/shmmax
[root@linux tools]# cat >> /etc/sysctl.conf
# 물리적 메모리량의 반정도 할당
kernel.shmmax = 81780736
[root@linux tools]#