You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ffb2ce2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: _wiki/Linux.md
+39-4Lines changed: 39 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,58 @@
1
-
[[---]]
1
+
---
2
2
layout : wiki
3
3
title : Linux
4
4
summary : linux 활용에 관한 모든것
5
5
date : 2018-08-21 18:28:36 +0900
6
-
updated : 2018-09-11 09:37:38 +0900
6
+
updated : 2019-05-20 02:04:33 +0900
7
7
tags : linux
8
8
toc : true
9
9
public : true
10
10
parent : DevOps
11
11
latex : false
12
+
adsense : true
12
13
---
13
14
14
-
# Linux 활용
15
+
## Linux 활용
16
+
17
+
### Linux Kernal Parameter
18
+
19
+
* 아래 설정에 하나하나 알아갈때마다 의미를 채워보자
20
+
21
+
```
22
+
vm.swappiness = 0 # swap memory 를 이용하지 않음.
23
+
24
+
net.core.somaxconn = 1000
25
+
net.core.netdev_max_backlog = 5000
26
+
net.core.rmem_max = 16777216
27
+
net.core.wmem_max = 16777216
28
+
29
+
net.ipv4.tcp_wmem = 4096 12582912 16777216
30
+
net.ipv4.tcp_rmem = 4096 12582912 16777216
31
+
net.ipv4.tcp_max_syn_backlog = 8096
32
+
net.ipv4.tcp_slow_start_after_idle = 0
33
+
net.ipv4.tcp_tw_reuse = 1 # TIME_WAIT local socket 재사용
34
+
net.ipv4.ip_local_port_range = 10240 65535 # local port 범위 조정
35
+
```
36
+
37
+
* 주의사항
38
+
* swap 메모리를 사용하지 않는다면, applicaiton 이 시스템 메모리를 80% 이상 점유하지 않도록 하자.
39
+
* [[번역] Linux에서 메모리를 다 써버렸을 때 일어나는 일](https://medium.com/@EJSohn/%EB%B2%88%EC%97%AD-linux%EC%97%90%EC%84%9C-%EB%A9%94%EB%AA%A8%EB%A6%AC%EB%A5%BC-%EB%8B%A4-%EC%8D%A8%EB%B2%84%EB%A0%B8%EC%9D%84-%EB%95%8C-%EC%9D%BC%EC%96%B4%EB%82%98%EB%8A%94-%EC%9D%BC-9dadba29c89c?fbclid=IwAR1RSqZZReZdsexmbhRvf_bjMqyP8Sz-z7NhOd0Q9cXGqo1zvQf6Bf99mAY)
40
+
41
+
### 자주쓰는 문법
15
42
16
43
17
-
* 자주쓰는 문법
18
44
```
19
45
grep -rn "찾고자 하는 문자열" *
20
46
```
47
+
48
+
* while 문으로 주기적인 실행
49
+
50
+
```
51
+
while true ; do echo -n "$(date) " ; ss -s | grep timewait ; sleep 1 ; done
0 commit comments