Problem Statement
: Server processing is slow, how will you troubleshoot to improve server processing time?
1. Is any specific application of server slow?
a. Can we kill it?
b. Application is required by system?
- Does application require more resources than provided by system?
(Example - Running Android Studio on 1GB RAM machine)
- Possible to close sub-resources from application?
(Example - Closing unwanted tab / windows of browser)
2. System is slow? I’m not aware which application / process is making it slow.
a. Check resource metrics of system - CPU, memory and disk
b. Check resource metrics for each process.
- Use $ top command - get info around process state, CPU, memory
- from list of processes, check, which procss is consuming max resources
- If process not required, kill it ( $ kill pid)
- Similar command to $ top → $ ps
- Top command gives dynamic view of processes whereas ps - static
c. Check for any background processes running of machine. [daemons]
→ if unrequired daemon, kill it.
→ if required, can we reduce the frequency of daemon process execution?
d. Are these any zombie processes?
→ search on google - ‘how to find zomebie process?’
e. Disk utilization on machine
→ du or df - disk usage or disk free
→ inode
** what is inode? - Any file you create in system is mapped to inode to store any file metadata.
Now in case you’re not left with any inode (through disk space is available), you’ll not be able to create aby new file leading to process stuck state
(Any process requiring filee creation, will not be able to do it)
→ To solve, can we delete any unused files?
→ Check which directories are consuming max space. Can we delete unrequired files of data from system.
f. Reboot the system
system is running for long.
Rebooting the system might help.
g. Improve resources of system.
→ Increase CPU cores
→ Increase RAM
→ Increase Disk
Reference
'Dev > Linux' 카테고리의 다른 글
[Linux] SSH connectivity Issues (0) | 2022.09.11 |
---|---|
[Linux] How to Secure A Server (0) | 2022.09.10 |
[Linux] Kernel (0) | 2022.09.05 |
[Linux] Network commands - curl, wget (0) | 2022.08.25 |
[Linux] soft link와 hard link의 차이점 (0) | 2022.08.23 |
댓글