LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2015, 08:47 AM   #1
alanford
LQ Newbie
 
Registered: Jun 2015
Location: planet of boredom
Distribution: debian
Posts: 18

Rep: Reputation: Disabled
why swap is not listed than tmpfs and what are watchdog, writeback... processes?


Hi,

I used vnc to connect to VPS and debian installer to install debian 8, at least I was thinking it is net installation, about 300MB, but as you see below, it has 825MB and I chose only ssh server installation (tasksel), no web server, desktop, print or anything else. I wanted to do it later manually, by myself.

I chose also partitioning, vda for filesystem and swap, but here below I don't see swap listen anywhere and I never chose /dev /run and so on, I chose only vda1 as / mount point and swap, I didn't crate any additional partitions (tmpfs). so, why i have all this listed? I didn't create it during installation.

Code:
/etc/apt# df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       1.1T  825M  975G   1% /
udev             11M     0   11M   0% /dev
tmpfs           3.0G  8.7M  3.0G   1% /run
tmpfs           7.4G     0  7.4G   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           7.4G     0  7.4G   0% /sys/fs/cgroup
consequently VPS is spending 280MB RAM and I just installed ssh server. I have crowd of kworker, migration, watchdog, writeback processes, I don't know if they are important, can I kill it? what is kworker, migration, khelp, watchdog, writeback?

I think basic debian installation should spend less than 100MB RAM. this eats 280MB.
 
Old 06-21-2015, 10:29 AM   #2
alanford
LQ Newbie
 
Registered: Jun 2015
Location: planet of boredom
Distribution: debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
so, it is all about kernel and I should not touch it?

watchdog - a software watchdog daemon

Synopsis

watchdog [-f|--force] [-c filename|--config-file filename] [-v|--verbose] [-s|--sync] [-b|--softboot] [-q|--no-action]

Description

The Linux kernel can reset the system if serious problems are detected. This can be implemented via special watchdog hardware, or via a slightly less reliable software-only watchdog inside the kernel. Either way, there needs to be a daemon that tells the kernel the system is working fine. If the daemon stops doing that, the system is reset.

watchdog is such a daemon. It opens /dev/watchdog, and keeps writing to it often enough to keep the kernel from resetting, at least once per minute. Each write delays the reboot time another minute. After a minute of inactivity the watchdog hardware will cause the reset. In the case of the software watchdog the ability to reboot will depend on the state of the machines and interrupts.

The watchdog daemon can be stopped without causing a reboot if the device /dev/watchdog is closed correctly, unless your kernel is compiled with the CONFIG_WATCHDOG_NOWAYOUT option enabled.

----------------

kworker means a Linux kernel process doing "work" (processing system calls). You can have several of them in your process list: kworker/0:1 is the one on your first CPU core, kworker/1:1 the one on your second etc..
if kworker is wasting your CPU, you can create CPU backtraces: watch your processor load (with top or something) and in moments of high load through kworker, execute echo l > /proc/sysrq-trigger to create a backtrace. Do this several times, then watch the backtraces at the end of dmesg output.

---------------

"migration" is a kernel process that distributes processes over cores it runs with priority RT in top glances.
 
Old 06-21-2015, 11:08 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
so, it is all about kernel and I should not touch it?
Correct.

Swap is not a filesystem and therefore does not show up in the output of the df command. The other stuff you see are virtual file systems and only exist in memory. For example /dev are device iids for your hardware and dynamically created at startup.
 
1 members found this post helpful.
Old 06-21-2015, 11:12 AM   #4
alanford
LQ Newbie
 
Registered: Jun 2015
Location: planet of boredom
Distribution: debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
thank you for your answer.
 
Old 06-21-2015, 12:18 PM   #5
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
To view swap usage, use:
Code:
free -h
My Debian systems boot to ~100MiB with X running (dwm window manager).

You can use `ps_mem` to view memory usage (it's just a python script):
https://github.com/pixelb/ps_mem/
 
Old 06-22-2015, 04:33 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,324
Blog Entries: 1

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
$ free -h

To see if swap is in use as previously mentioned.

# swapon -s

To see where it's at and priorities and such. You can also fiddle with /proc/sys/vm/swappiness to adjust how aggressively it swaps. Default is 60, but 20 seems more sane to me for a desktop / gaming usage.

My ram usage is about 40MB at boot. 130MB after starting a gui. About 280MB after launching a browser and other extras. But that's RAM usage. My install via debootstrap is around 200MB on disc (amd64) before adding a gui and applications. But that's before most anything of use is installed. Like a kernel to make it bootable.

$ pstree

To help you identify from where a process is related to other processes.

$ ps -FlAw

To see a more detailed list of running processes, including command line options. Kernel related ones are [] wrapped with that. Some kernel modules (drivers) create running processes.

$ which <application>
to find where a process is launched from.

$ apt-file find bin/<application>
to find what package (debian) contains that application

$ egrep -r -i "<application>" /lib/modules/$(uname -r)/*
to help find what module might be responsible for a running process/application.

$ apt-cache show <package_name>
to see the management systems description of a package. (also debian specific)

And many other options to help understand what your system is doing.
 
Old 06-22-2015, 04:39 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
How are you getting the 280 MB RAM usage number? Please post the output of "free -m".
 
Old 06-23-2015, 07:20 AM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,324
Blog Entries: 1

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
$ free -m
Code:
             total       used       free     shared    buffers     cached
Mem:           498        351        147         25          0        197
-/+ buffers/cache:        154        344
Swap:            0          0          0
The *154* on this laptop. But just using alsa on it, not pulse over jack and stuff. From the -/+ buffers/cache line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What if tmpfs space is full? Written to swap space? pstein Linux - Newbie 8 11-18-2012 07:51 AM
swap and tmpfs maheshp86 Linux - Hardware 1 06-30-2010 07:15 AM
Intel's watchdog support iTCO_wdt - does this mean watchdog is not present? kushalkoolwal Linux - Hardware 3 02-06-2009 04:16 PM
Hardware watchdog in BIOS and Linux watchdog driver are different? travishein Linux - Hardware 1 12-22-2008 10:41 PM
tmpfs and swap memory basics kushalkoolwal Debian 1 09-12-2005 05:24 PM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration