date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,429,872,458,000
i was working on writing a wrapper script for a tool. the wrapper script should prepare the environment and then call the tool in background then exit. it looks something like this: #!/bin/bash export FOO=1 tool "$@" & nothing spectacular here. except i erroneously did not call the tool (/usr/bin/tool) and instead ef...
Using forkstat if available should give a good indication if any process is running amok. E.g: forkstat -e fork When identified do either or all of: chmod -x /path/to/file mv ... rm ... Optionally use the -S flag (here simplified stats): $ forkstat -S ... loads of lines ^C Fork Exec Exit ... Total Proce...
how to detect and stop a script which calls itself in background and exits
1,429,872,458,000
I have a fairly big application under care. As part of its job it spawns some child processes and needs to monitor their state (running, crashed). Child process deaths were detected by setting signal handler for SIGCHLD using signal(2). Some time ago I migrated it to signalfd(2). What I did was simple: removed the si...
When migrating from signal handling based on signal(2) or sigaction(2) to signalfd(2) you change the way you receive signals. The old way leaves the signals unblocked, the new one needs them blocked. If you have some regions of code in which you do not want to be disturbed by signals you need to block them: sigset_t m...
File descriptor from `signalfd(2)` is never ready to read
1,429,872,458,000
How can I prevent starting processes automatically. (e.g. I used mysql database about a year ago). I killed the mysqld processs and now I see it's running again. And many other processes I don't know what are they good for. I'd like to have more control over the processes that are running, what I can turn off, what wi...
You can create an override for the service. Search for the service in /etc/init/. I have no mysql so I dont't know the exakt name. I take pulseaudio for example. ls -al /etc/init/ | grep pulse -rw-r--r-- 1 root root 1890 Apr 4 2014 pulseaudio.conf Then create the override-file for your Service sudo touch /etc...
Prevent starting processes automatically
1,429,872,458,000
I have a few processes that spring up and I am able to print a line of the pgid's that I would like to enter into a kill command. here is what I have: sudo ps o pgid,args | grep mininet: | sudo awk '{print -$0}' returns something like -3834 -3841 -3844 -3846 -3848 -3853 -3856 -3859 -3862 I negated the output in the ...
This command stops the processes: sudo ps o pgid,args | grep mininet: | sudo awk '{system("sudo kill --signal SIGSTOP -"$1)}' - In awk you can use system("program ") taking the advice to use pgrep this works too: sudo pgrep -f mininet: | sudo awk '{system("sudo kill --signal SIGCONT -"$1)}' -
kill processes in one line with kill, awk, ps, and grep
1,429,872,458,000
I have a Python script that does more or less this current_tasks = TaskManager() MAXPROCS = 8 while len(outstanding_tasks) > 0: if len(current_tasks.running) < MAXPROCS: current_tasks.addTask(outstanding_tasks.next()) else: current_tasks.wait_for_one_finish() and outstanding_tasks.next() is basic...
The short answer is: there isn't. You've already highlighted the workarounds necessary to deal with large data being sent through a subprocess pipe. The "nice big elastic buffer" pipe doesn't exist. This is called out in the Subprocess Management Python documentation as a potential source of deadlocks, with the added ...
Managing the output streams of many subprocesses with deadlocks
1,661,351,478,000
qBittorrent-nox which was running perfectly until last week, but since then it always crashes on my Ubuntu 14.04. Theoretically it's logging, but the log file only conatines these lines: ******** Információ ******** A qBittorrent vezérléséhez, nyisd meg ezt a címet: localhost:8080 Web UI adminisztrátor felhasználó nev...
How to test if a daemon is running? It depends. Some daemons has a file with the process ID in say /var/run/foo.pid. An example of that is /var/run/crond.pid. $ cat /var/run/crond.pid 432 If the process is running it has a directory in /proc: $ ls /proc/$(cat /var/run/crond.pid) So if the directory in /proc does not...
How to write a crontab script, that will check a process' status and launch it if not running?
1,661,351,478,000
I got this script named fork.sh: #!/bin/sh forkbomb() { forkbomb | forkbomb & } ; forkbomb If I call it through suexec my whole system will consume 99% cpu. To prevent a normal bash forkbomb I used the limits.conf and set nproc to 50. This works as expected. But if I call the above mentioned script through suexec ...
The limits files are utilized by PAM. The stock suexec provided by apache still does not recognize or utilize PAM. Patches exist. And you can modify the source directly to invoke setrlimit (it looks pretty easy - see the setlimit(2) man page.) But as is, suexec will not recognize anything you do with limits. You can ...
Systemcrash suexec forkbomb.sh ulimits
1,661,351,478,000
I am using several instances (profiles) of Icedove (Thunderbird) and when I need to close all of them, I use: killall icedove According to man killall, if no signal name is specified, SIGTERM is sent. And, `SIGTERM` allows the process to perform nice termination releasing resources and saving state if appropriate. ...
SIGTERM allows a process to perform cleanup before it terminates, but whether or not the process actually does so, and what sort of cleanup it performs, depends on how the program was written and (to an extent) on the facilities that the language the program was written in provides. So when a program receives SIGTERM ...
gracefully terminating processes with killall <processname>
1,661,351,478,000
I am using Linux. When i opened gedit program in gnome-terminal by gedit command it has opened the graphical gedit text editor. then the gedit has PPID bash ashokkrishna@ashokkrishna-Lenovo-B560:~$ ps -eaf | grep gedit ashokkr+ 1682 820 3 04:09 pts/6 00:00:00 gedit ashokkr+ 1695 1568 0 04:09 pts/...
What you're seeing should not surprise you. You've started gedit two different ways, via two different parents, so of course the PPID — parent process ID — is different in the two cases. The first is a child of Bash, because you started it from a Bash command line. The second child's initial process will be your OS's ...
Why PPID is different when opening from terminal and when opening by doubleclicking
1,661,351,478,000
You can list the process ID of each widow with this command: wmctrl -lp Does there exist a command that shows the running command of each window (kind of like htop has a column for "Command")? If not, how could you combine commands to ultimately achieve this?
This will replace the pid in wmctrl -lp’s output with the corresponding command, if one is found: wmctrl -lp | awk '{ pid=$3; cmd="ps -o comm= " pid; while ((cmd | getline command) > 0) { sub(" " pid " ", " " command " ") }; close(cmd) } 1' This obviously won’t work for windows displaying remote processes; it also wi...
List Running Commands of All Windows
1,661,351,478,000
I am tending to a program "master" which manages a set of concurrently running sub-processes "slaves". Sub-processes are launched and killed as needed. Many of these sub-processes use start-scripts. Output of pstree looks like this (excerpt, the master is implemented in Java, two slaves launched via script): systemd──...
That's likely not systemd doing it. Instead, the process is killed by a SIGPIPE when it tries to write to a pipe where the read side has been closed -- which fits the description "standard output was previously read by another process."
Why do my orphaned grandchildren die only if they produce output?
1,661,351,478,000
I'm trying to use the pidof command to see my script is already running as I only want this executable if the script is not already running, however, it seems the pidof command is not returning the pid of the script using the name which is displayed in ps -ef output. Instead it is masking this name as either /usr/bin/...
pidof doesn't offer a way to specify /path/to/script to match commands of the form interpretername /path/to/script. It always looks at the filename of the executable listed in the /proc/pid/stat file. But it will work if your script begins with a shebang #! and if you invoke the script with /path/to/script. As an alte...
Process name 'masked' by /usr/bin/python and /bin/su
1,661,351,478,000
I need to run a program xyz. It finishes execution in a few seconds. It has some signal handling I need to test. From the shell or a bash script how do I execute the program and while it is executing send it a signal like kill -14. Currently, the command I am trying, is /usr/local/xyz input > some_file 2>&1 & PIDOS=$!...
That command looks ok. Though when I tried that, it appears the command was too fast. It's as if my test script didn't have time to install the signal handler before it got shot. A test script: $ echo '$SIG{USR1} = sub { print "GOT SIGNAL\n" }; sleep 100' > sigtest.pl Shoot it immediately: (the sleep is there so the...
How do I run a process and send it a SIGNAL while its running?
1,661,351,478,000
I run the top command on my linux machine and I see that vim command take like 99.5% CPU PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 23320 gsachde 25 0 10720 3500 2860 R 99.5 0.2 30895:1...
If you press c while in top then the command will be expanded to show the full command used to start the process. You can also take the PID and run: ps -ef | grep $PID Or: cat /proc/$PID/cmdline
linux + top command
1,661,351,478,000
Assume I have a long running process, long_running_proc with a single TCP connection to host host.example.com. Is that process treated differently, by the OS or the shell, when it's run as a foreground process vs background or behind screen? For instance: ~ long_running_proc --connect host.example.com ... vs. ~ scree...
In general, by default the only difference is that it would receive a SIGTTIN (or SIGTTOU) signal if it tried to read (or write) the tty while being in the background. Other differences as to priorities or higher context switches depend on your shell (or screen) if it willingly does anything of that sort, such as chan...
Are processes within screen treated differently from foreground processes?
1,661,351,478,000
I've over 10 windows of a file manager (Thunar, on Xubuntu Core 18.04) open, but ps aux|grep thunar shows nothing (except for the grepped string). Why? ps -e doesn't not show anything either. EDIT: I suspect a reason may be that the location (in the address bar) in those windows is an ejected external media. Another...
Thunar used to use a capital 'T' in its name. The package for 18.04 has both Thunar and thunar in it. Try changing your grep command to ignore case: ps aux | grep -i thunar
File manager instances not showing among running processes
1,661,351,478,000
I am a little bit confused about /proc directory. Each process frequently updating its state, memory info, progress etc in their process. My question is that the /proc directory keeps the memory or writes on harddrive each information. What I believe that It frequently updating the information it takes IO operations ...
The /proc directory itself exists as an empty directory on the hard drive. It's contents, however, are added by the kernel without touching the disk. If you try to access /proc before it is mounted (say, booting your system with nothing but a shell with init=/bin/sh), it will be empty. You can replicate /proc on any d...
Is /proc folder and process details really exists on hard drive [duplicate]
1,661,351,478,000
Is there a common utility (Ubuntu, perhaps OSX) that can run a server serve ./public, then run some tests ./run-chrome-tests.sh, and once the tests are finished, kills the serve ./public. This can be done in bash, but I'd rather create configuration, than code if it is feasible.
There is to my knowledge no such utility, but it is easily implemented in a shell script. A short shell script that implements what you described: #!/bin/sh serve ./public & serve_pid=$! ./run-chrome-tests.sh kill "$serve_pid" You may want to insert a sleep 3 call (or similar) after starting serve in the background...
Utility that can be configured to run two commands, and kill both when one finishes
1,661,351,478,000
I've just accidentally opened rockyou.txt in Kali Linux on a fairly slow computer. It has now been sitting on the desktop loading the 30million words for over an hour. It is not frozen, as I can still use the mouse, and the clock display is still changing, however, I cannot cancel, close or open anything else. Is ther...
It should be possible to go to the terminal by typing Ctrl-Alt-F1, logging in and searching for offender with top, then remembering it's name or pid and killing it: by pid: kill -KILL pid by name: pkill -KILL -f name SIGKILL will make it go away if it's not hanged "inside kernel", i.e. there is bad syscall which doe...
Opened file with several million lines: how to close it?
1,661,351,478,000
I've created a very large and complex python program and I now know it has a serious bug that I'm having a very hard time pinning down. I'm using this code in a production environment so I need a stop-gap measure to implement until I find and correct my coding issue. I need to create a bash script that I can use to ch...
Here's a crude attempt: read -r pid cpu rest < <(ps -eo pid -eo pcpu -eo command |grep python |grep pycode.py) if (( ${cpu%.*} < 5 )) ; then kill -TERM $pid fi We use ${cpu%.*} to truncate it to an integer, since bash can't handle floats. This only runs once; if you want to keep it going, put it on a cron job, or...
Need script to kill python process with low CPU usage
1,661,351,478,000
Is there a common way or existing utility to do the following? kill a process Give it a few seconds to shut down gracefully kill -9 it if it hasn't stopped
Usually I try to keep things as simple as: kill $pid; sleep 5; kill -9 $pid Or you can search a process by its name if you like: pkill $pattern; sleep 5; pkill -9 $pattern This is handy when you are working in a terminal, but for scripting you may prefer a more sophisticated solution from another answer.
Idiomatic way to kill -9 only if "graceful" way doesn't work?
1,661,351,478,000
I had some system slowdown event1 after mistakenly using a command so I thought I could use a desktop "widget" to visually show quality of service or at least show when QoS was degraded and get some timely feedback. We have this natural ability to perceive degradation in the playback of an image sequence so I wanted t...
I hope you're aware there are already a lot of system monitoring widgets. But anyway: NOTE: Depending on your setup, there may be a dedicated hardware path for video. So its possible this doesn't really require any CPU time. But while ffmpeg may use that, animate probably doesn't. NOTE: For your animation to slow down...
How can I make my command more susceptible to system slowdowns so as to use it as a visual QoS widget on my desktop?
1,681,866,405,000
I am using a Debian 9.13. Trough ps -aux | grep NaughtyProcessName i can find information about a given process that interests me in the format: user.name [ID] [CPU USAGE] [%MEM] VSZ RSS TTY STAT START TIME COMMAND Where command shows something like: path/to/interpreter ./file_name.cmd So i suppose some user was ins...
Given a process id <pid>, then /proc/<pid>/cwd is a symlink to the working directory for that process. That is, if I run python ./example.py from ~/tmp/python, in ps I will see: $ ps -f -p 118054 UID PID PPID C STIME TTY TIME CMD lars 118054 6793 0 09:16 pts/1 00:00:00 python ./exampl...
Find filepath that spawned process
1,681,866,405,000
I have a laptop with minimal resources and this process, "gnome-software", takes up huge space in RAM. I have to kill it every time. Is there permanent way to stop this process?
gnome-software is the GNOME frontend to the PackageKit, a GUI utility to install and update packages. If it bothers you, you can uninstall it via apt-get remove gnome-software and install/update software via CLI using apt-get.
How to stop a process permanently for every session?
1,681,866,405,000
I'm trying to know if some GUI process is idle o minimized in Linux, using Net-SNMP. I've been doing research and as far as I know, SNMP seems to be designed for monitoring services, not processes run by regular users. I've found just one MIB object, hrSWRunStatus (RFC 2790), which has only four running statuses: runn...
In the comments you said you want to develop a time tracking app, for tracking application usage. I guess you might do it by tracking which window is the active one at any given time. To do that, you would need to get access to the user's X11 session, and then repeatedly query its X11 property named _NET_ACTIVE_WINDO...
Identify idle or minimized process
1,681,866,405,000
Eg. Processes being run by various users are as below. root 5 xuser 3 yuser 1 Then the script should give the output as: root ..... xuser ... yuser .
You can use bash printf and tr to do this histogram: while read name num; do dots=$(printf "%*s" $num " " | tr " " .) printf "%s\t%s\n" "$name" "$dots" done <<END root 5 xuser 3 yuser 1 END root ..... xuser ... yuser .
Shell Script to fetch linux processes and show the process count for individual user as "." [closed]
1,681,866,405,000
I have a simple bash script that checks if a program is running and actions accordingly. #!/bin/bash check_running=$(pgrep -x redshift) if [[ -n "$check_running" ]]; then echo "1" else echo "0" fi If I execute the script normally (./script) then it will always return 1. But if I use "bash -x script"...
When you run ./redscript, pgrep -x redscript will match that script's process, so check_running will have a PID. You can put a set -x in the script, or use #! /bin/bash -x as the shebang, to verify this.
Bash script if statement returning incorrect result while bash -x works
1,681,866,405,000
Is there a program in Linux to control which processes are allowed to run with some kind of control list? So that, when you will try to run a process that is not in the list you will be notified about it and asked if to add it to the list of allowed processes.
No. The Unix security model is based on users and resources. It is designed to control which users have access to which resources. Resources are mostly exposed as files, and access control is done through file permissions. Processes are merely agents of the user. There is no restriction on what code a user may run. Th...
List of processes allowed to run
1,681,866,405,000
I'm running Ubuntu 16.04 I have this process X running from multiple tty. I run it from other pseudo terminals using the screen command and it also runs from crontab. This program is launched from a python script which is launched from a bash script. Sometimes, the python script gets an exception which I'm not able to...
Start a new process group for the Python code (using the setsid utility) and whatever other processes (including the application proper) it starts, so you can kill the entire process group if needed. You can use the following construct to do so: exec 3>&1 pgid=$(exec setsid bash -c 'echo $$; exec >&3-; exec COMMAND......
Custom "garbage collector" to manually close a program
1,681,866,405,000
I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from time to time, and wc is used to simulate a command (C2) which processes that output when C1 finishes. After waiting for a l...
In bash you can run: cmd1 | cmd2 | (trap '' INT; cmd3) And a Control-C will only kill cmd1 and cmd2, but not cmd3. Example: $ while sleep .1; do echo -n 1; done | (trap '' INT; tr 1 2) ^C222222222 $ while sleep .1; do echo -n 1; done | tr 1 2 ^C This takes advantage of the fact that a signal disposition of "ignore" ...
How to kill only current process and continue with shell pipe-line?
1,681,866,405,000
Why is the parole(just a media palyer) still listed in the "JOBS" command output even after killing maually and why is not listed in the "PS" command output ? Does this mean the process is still runnig in background(ps:when i issued kill command the media playe[parole] is closed))? If running why is it not listed in ...
jobs will apear one last time after any command once terminated. see below > sleep 30 & [1] 134042 > ps PID TTY TIME CMD 134009 pts/4 00:00:00 bash 134042 pts/4 00:00:00 sleep 134043 pts/4 00:00:00 ps > kill 134042 > date Mon Aug 3 22:11:58 CEST 2020 [1]+ Terminated sleep 30...
Why is a process being shown while using "jobs" command after killing the process manually?
1,681,866,405,000
I'm trying to determine whether a command I'm running is within an SSH session. Usually this works fine by checking for $SSH_CONNECTION or walking the process tree and looking for sshd. However, if I start a screen session locally and then re-attach it through SSH, neither of those works. Is there some way from within...
After a lot of experimentation, here's what I ended up with: Find the screen the shell is running under. Keep walking the pstree until a screen process is found: screen_pid=$(pstree -psUA $$ | egrep -o 'screen\([0-9]+\)' | tail -1 | egrep -o '[0-9]+') Look at all opened files for that process. Find the only /dev/pts...
Determine the shell from which screen reattach was called
1,681,866,405,000
I wrote a shell.nix file to build the development environment for one of my projects. I'm using a shellHook to ensure a postgresql server is started when you drop into the nix-shell. The shellHook is essentially: export PGDATA=$PWD/nix/pgdata pg_ctl start --silent --log $PWD/log/pg.log Despite the fact that pg_ctl s...
It seems the problem was that the postgresql server was running as part of the same process group as the shell that launched it via pg_ctl. Typing propagated a SIGINT to all processes in the group. One way to fix this is to launch postgresql in its own session using setsid. setsid pg_ctl start --silent --log $PWD/log/...
Background process (postgresql) receiving SIGINT from Ctrl-C in shell
1,681,866,405,000
First of all hello, and thank you for taking the time to read my question. Update: What my desired outcome with this question is to know the best way to handle a browser process using up all the memory via automation. to return the memory via end of process or some other way if there is one. the process in quest...
I'm not sure if this is the best practice but i got away with just creating a one-liner that checks if greater then 80% then end the process. [ $(free -m| grep Mem | awk '{ print int($3/$2*100) }') -gt "80" ] && pkill application || echo "Not Over 80%" Please note that this one-liner is matched up from other points ...
How can i automatically handle hogging process before system freeze?
1,681,866,405,000
I am trying to build a terminal based GUI for a tool. The following code invokes something like this while true do CHOICE=$(dialog --keep-window --clear --no-shadow \ --backtitle "$BACKTITLE" \ --title "$TITLE" \ --menu "$MENU" \ $HEIGHT $WIDTH $CHOIC...
exec is a shell builtin as per bash man page (be patient, it is far away) exec [-cl] [-a name] [command [arguments]] If command is specified, it replaces the shell. No new process is created. consider 2 script exec ls pwd and ls pwd if you execute the first shell, exec ls command will replace shell (d...
Edit file with vim using Dialog
1,681,866,405,000
I'm looking for process manager which can be controlled from CLI (add, start, stop, delete), so I can control it programmatically. I've tried using https://github.com/circus-tent/circus, but the problem is when I add it from CLI, the processes is disappear after server restart. I opened an issue there; https://github...
The package I recommend for this is called daemontools by Dan Bernstein. This is a collection of tools to provide system-wide service supervision and to manage services. It not only cares about starting and stopping services, but also supervises the service daemons while they are running. Amongst other things, it pr...
Process management - add daemon process from CLI
1,377,261,966,000
I'm wondering about the way Linux manages shared libraries. (actually I'm talking about Maemo Fremantle, a Debian-based distro released in 2009 running on 256MB RAM). Let's assume we have two executables linking to libQtCore.so.4 and using its symbols (using its classes and functions). For simplicity's sake let's call...
NOTE: I'm going to assume that your machine has a memory mapping unit (MMU). There is a Linux version (µClinux) that doesn't require an MMU, and this answer doesn't apply there. What is an MMU? It's hardware—part of the processor and/or memory controller. Understanding shared library linking doesn't require you to und...
Loading of shared libraries and RAM usage
1,377,261,966,000
Let's say I'm running a script (e.g. in Python). In order to find out how long the program took, one would run time python script1.py Is there a command which keeps track of how much RAM was used as the script was running? In order to find how much RAM is available, one could use free, but this command doesn't fit t...
The time(1) command (you may need to install it -perhaps as the time package-, it should be in /usr/bin/time) accepts many arguments, including a format string (with -f or --format) which understands (among others) %M Maximum resident set size of the process during its lifetime, in Kbytes. %K ...
Unix command to tell how much RAM was used during program runtime? [duplicate]
1,377,261,966,000
I'm running BOINC on my old netbook, which only has 2 GB of RAM onboard, which isn't enough for some tasks to run. As in, they refuse to, seeing how low on RAM the device is. I have zRAM with backing_dev and zstd algorithm enabled, so in reality, lack of memory is never an issue, and in especially tough cases I can al...
After some thinking, I did this: Started with nano /proc/meminfo Changed MemTotal, MemFree, MemAvailable, SwapTotal and SwapFree to desired values and saved to ~./meminfo Gave the user boinc password sudo passwd boinc and shell -- sudo nano /etc/passwd , found the line boinc:x:129:141:BOINC core client,,,:/var/lib/boi...
How can I fake the amount of installed RAM for a specific program in Linux?
1,377,261,966,000
Is there any way to know the size of L1, L2, L3 caches and RAM in Linux?
If you have lshw installed: $ sudo lshw -C memory Example $ sudo lshw -C memory ... *-cache:0 description: L1 cache physical id: a slot: Internal L1 Cache size: 32KiB capacity: 32KiB capabilities: asynchronous internal write-through data *-cache:1 description: L2 c...
Is there any way to know the size of L1, L2, L3 cache and RAM in Linux? [closed]
1,377,261,966,000
Possible Duplicate: Can I identify my RAM without shutting down linux? I'd like to know the type, size, and model. But I'd like to avoid having to shut down and open the machine.
Check out this How do I detect the RAM memory chip specification from within a Linux machine question. This tool might help: http://www.cyberciti.biz/faq/check-ram-speed-linux/ $ sudo dmidecode --type 17 | more Sample output: # dmidecode 2.9 SMBIOS 2.4 present. Handle 0x0018, DMI type 17, 27 bytes Memory Device ...
How to find information about my RAM? [duplicate]
1,377,261,966,000
I'm planning on getting some ECC RAM to replace the non-ECC RAM I currently have installed on my Asus M5A97 Pro motherboard (AMD 970 chipset, FX-6100 CPU). After I install the RAM, how do I tell whether the ECC feature of the RAM is working properly? I thought about dmidecode --type memory which currently prints among...
It appears that there is no surefire way to tell, however various approaches can get you some sort of answer. Apparently you pretty much have to try the different ones until you find one that tells you ECC is working. In my case memtest86+ 4.20 couldn't be coaxed into realizing it was dealing with ECC RAM; even if I c...
How to tell whether RAM ECC is working?
1,377,261,966,000
I have 32 GB of memory in my PC. This is more than enough for a linux OS. Is there an easy to use version of Linux (Ubuntu preferably) that can be booted via optical or USB disk and be run completely within RAM? I know a live disc can be booted with a hard disk, but stuff still runs off the disc and this takes a while...
Ubuntu can run on RAM, but it requires some manual changes: https://wiki.ubuntu.com/BootToRAM
Is there a linux OS that can be loaded entirely into RAM?
1,377,261,966,000
I have been tasked with running Linux as an operating system on an embedded device. The target has an x86 processor and has 8 GB CompactFlash device for storage. I have managed to use buildroot to create the kernel image and cross compilation tools. I have partitioned the CF device into a small FAT partition where t...
New answer (2015-03-22) (Note: This answer is simpler than previous, but not more secure. My first answer is stronger because you could keep files read-only by fs mount options before permission flags. So forcing to write a files without permission to write won't work at all.) Yes, under Debian, there is a package: fs...
Is using a read only root file system a good idea for embedded setup?
1,377,261,966,000
How to be sure that a tmpfs filesystem can only deal with physical and it's not using a swap partition on disk? Since I have a slow HDD and a fast RAM, I would like, at least, giving higher priority to the RAM usage for swap and tmpfs or disabling the disk usage for tmpfs related mount points.
use ramfs instead of tmpfs. ramfs is a ramdisk (no swap) tmpfs can be both in your /etc/fstab: none /path/to/location ramfs defaults,size=512M 0 0 edit the size parameter to whatever you like but be careful not to exceed your actual amount of ram. NOTE: the use of a ramfs instead of tmpfs is not somet...
How to make tmpfs to use only the physical RAM and not the swap?
1,377,261,966,000
I have a desktop system where Centos 7 is installed. It has 4 core and 12 GB memory. In order to find memory information I use free -h command. I have one confusion. [user@xyz-hi ~]$ free -h total used free shared buff/cache available Mem: 11G 4.6G 231M ...
man free command solve my problem. DESCRIPTION free displays the total amount of free and used physical and swap mem‐ ory in the system, as well as the buffers and caches used by the ker‐ nel. The information is gathered by parsing /proc/meminfo. The dis‐ played columns are: ...
What is difference between total and free memory
1,377,261,966,000
My server runs out of memory even though there is swap available. Why? I can reproduce it this way: eat_20GB_RAM() { perl -e '$a="c"x10000000000;print "OK\n";sleep 10000'; } export -f eat_20GB_RAM parallel -j0 eat_20GB_RAM ::: {1..25} & When that stabilizes (i.e. all processes reach sleep) I run a few more: paralle...
In /proc/meminfo you find: CommitLimit: 1551056920 kB Committed_AS: 1549560424 kB So you are at the commit limit. If you have disabled overcommiting of memory (to avoid the OOM-killer) by: echo 2 > /proc/sys/vm/overcommit_memory Then the commit limit is computed as: 2 - Don't overcommit. The total address s...
Out of memory, but swap available
1,377,261,966,000
How to prevent chrome to take more than for example 4GB of ram. From time to time he decides to take something like 7GB (with 8GB RAM total) and makes my computer unusable. Do you have any help. PS: I even didn't have more than 10 tabs opened. Edit: maybe I did ... something like 15. Anyway I want chrome to freeze or...
I believe you would want to use something like cgroups to limit resource usage for a individual process. So you might want to do something like this except with cgcreate -g memory,cpu:chromegroup cgset -r memory.limit_in_bytes=2048 chromegroup to create chromegroup and restrict the memory usage for the group to 2048 ...
Chrome eats all RAM and freezes system
1,377,261,966,000
I have done several searches and I cannot find anything on Google about why but arch has allocated 7.7 gigs to ram and 7.9 to swap. I only have 8 gigs ram. it allocated more ram to swap than regular How could I change the allocations? output of cat /proc/meminfo: MemTotal: 8091960 kB MemFree: 4925736...
What this is telling you is that you have 16GB of virtual memory. Virtual memory is the total of physical RAM and swap space added up. It's a way of letting your system run more programs than it physically has the space for. How much swap should be allocated to a machine is a complicated and opinionated question; ask ...
Arch Linux thinks I have about 16 gigs of ram when I only have 8
1,377,261,966,000
kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 0, row 7, labels ":": i3200 UE All of a sudden today, our CentOS release 6.4 (Final) system started throwing EDAC errors. I rebooted, and the errors stopped. I have been searching for answers, but they fall into two camps, memory or a chipset. I would like some advice o...
What you're experiencing is an Error Detection and Correction event. Given the error includes this bit: MC0 you're experiencing a memory error. This message is telling you where specifically you're experiencing the error. MC0 means the RAM in the first socket (#0). The rest of that message is telling you specifically ...
Does kernel: EDAC MC0: UE page 0x0 point to bad memory, a driver, or something else?
1,377,261,966,000
I have an Intel Atom D2700 (Synology NAS DS412+) with 4GB RAM running kernel 3.2.30 x86_64. This unit has a single DIMM slot. One thing I, and other's have found, is that when adding a 4GB DIMM versus a 2GB DIMM, the unit experiences significantly higher CPU usage when under load (for example, 'heavy' Java applicatio...
Have a look at the Intel Atom® processor D2000 and N2000 series Datasheet, vol. 1. Note pages 32-33 and table 3-24. The takeaway from that is while your processor and memory controller support 4 GB of total RAM, they only support it in 2 GB chunks, in 2 GB per slot. Since your 412+ only has one slot, 2 GB is your max...
Processor usage increases with 4GB RAM installed
1,377,261,966,000
I want to create a fixed size Linux ramdisk which never swaps to disk. Note that my question is not "why" I want to do this (let say, for example, that it's for an educative purpose or for research): the question is how to do it. As I understand ramfs cannot be limited in size, so it doesn't fit my requirement of havi...
This is just a thought and has more than one downside, but it might be usable enough anyway. How about creating an image file and a filesystem inside it on top of ramfs, then mount the image as a loop device? That way you could limit the size of ramdisk by simply limiting the image file size. For example: $ mkdir -p /...
How to create a fixed size Linux ramdisk which does never swap to disk?
1,377,261,966,000
My problems were caused by a faulty memory module and quite possibly a broken kernel binary. I just now booted my PC with basically brand new hardware. I've been running Debian 6.0 AMD64 before, and no change there (literally; I just unplugged the hard disks from the old motherboard and reconnected them to the new on...
First, if your BIOS/UEFI does not detect correctly your RAM, then your OS won't do any better. There's no need to go any further if your BIOS display incorrect information about your setup. => You probably have at least an hardware problem. EDIT: From your dmesg | grep memory, it seems that you have in fact an hardwa...
64-bit Linux doesn't recognize my RAM between 3 and 32 GB
1,377,261,966,000
I have a system with 8 x 16 GB DIMMs, so 128 GB total. However, the MemTotal reported by /proc/meminfo is 131927808 kB, so 131 GB My research suggests that if anything, the meminfo should add up up to less than the RAM total. Understanding /proc/meminfo file (Analyzing Memory utilization in Linux) So Google's calculat...
Memory capacity in DIMMs is measured in powers of two, so a claimed RAM capacity of “128 giga-something” is 128 GiB which is 134,217,728 kiB. /proc/meminfo also measures memory in powers of two, so the MemTotal value of 131,927,808 can be compared with 134,217,728 and is safely less. MemTotal is the total installed ph...
Discrepancy between physical RAM and /proc/meminfo
1,377,261,966,000
The following three outputs were taken essentially simultaneously: top: top - 02:54:36 up 2 days, 13:50, 3 users, load average: 0.05, 0.05, 0.09 Tasks: 181 total, 1 running, 179 sleeping, 0 stopped, 1 zombie %Cpu(s): 2.5 us, 0.8 sy, 0.0 ni, 96.6 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 16158632 tota...
A complete re-write of my previous post. Got a bit curious and checked out further. In short: the reason for the difference is that openSUSE uses a patched version of top and free that adds some extra values to `cached'. A) Standard version top, free, htop, ...: Usage is calculated by reading data from /proc/meminfo:...
htop reporting much higher memory usage than free or top
1,377,261,966,000
I am using Arch Linux (5.1.8-arch1-1-ARCH) with the XFCE DE and XFWM4 WM. Things are pretty elegant and low on RAM and CPU usage. After the boot, and when the DE is loaded completely, I see 665 MiB of RAM usage. But after opening applications like Atom, Code, Firefox, Chromium, or after working in GIMP, Blender etc. t...
Unused RAM is wasted RAM. The Linux kernel has advanced memory management features and tries to avoid putting a burden on the bottleneck in your system, your hard drive/SSD. It tries to cache files in memory. The memory management system works in complex ways, better performance is the goal. You can see what it is doi...
Why does my system use more RAM after an hour of usage?
1,377,261,966,000
I am currently having some issues running Java. It won't start because of heap issues. But I have more than 9 GB Ram free (or even 16 GB if you assumed the cache would be empty). This is the error I get (and the free command) root@server: ~ # java Error occurred during initialization of VM Could not reserve enough spa...
OpenVZ & Memory The failcnt is going up on privvmpages, so your container is unable to allocate any more virtual memory space from the host: root@server: ~ # cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit ...
Java "Could not reserve enough space for object heap" even though there is enough RAM
1,377,261,966,000
Memtester has outputted the following response, memtester version 4.3.0 (64-bit) Copyright (C) 2001-2012 Charles Cazabon. Licensed under the GNU General Public License version 2 (only). pagesize is 4096 pagesizemask is 0xfffffffffffff000 want 10240MB (10737418240 bytes) got 10240MB (10737418240 bytes), trying mlock ...
Unless you can detect errors reasonably quickly, e.g. with ECC memory or by rebooting regularly with memtest, it’s better to replace the module. You risk silent data corruption. You can tell the kernel to ignore memory by reserving it, with the memmap option (see the kernel documentation for details): memmap=nn[KMG]$...
What can I do with the output of memtester when it shows bad memory?
1,377,261,966,000
If I have a tmpfs set to 50%, and later on I add or remove RAM, does tmpfs automatically adjust its partition size? Also what if I have multiple tmpfs each set at 50%. Do multiple tmpfs compete against each other for the same 50%? How is this managed by the OS?
If you mount a tmpfs instance with a percentage it will take the percent size of the systems physical ram. For instance, if you have 2gb of physical ram and you mount a tmpfs with 50%, your tmpfs will have a size of 1gb. In your scenario, you add physical ram to your system, let's say another 2gb, that your system has...
Does tmpfs automatically resize when the amount RAM changes, and does it compete when there's multiple tmpfs?
1,377,261,966,000
When I see that phrase (or similar), as e.g. today in How to Use the free Command on Linux (article with 2020 date): RAM that isn’t being used for something is wasted RAM I recall about LPDDR used for mobile devices: Additional savings come from temperature-compensated refresh (DRAM requires refresh less often at l...
Has Linux kernel abandoned universally applying "RAM that isn’t being used for something is wasted RAM" approach? No, it hasn’t: it is still the case that the kernel will not try to avoid using memory which is available. However, it supports memory hotplug, which could conceivably be paired with features such as tho...
Has Linux kernel abandoned universally applying "RAM that isn’t being used for something is wasted RAM" approach (e.g for mobile devices)?
1,377,261,966,000
I'm using CentOS 7, I find my available memory is less than free memory, but why? root@localhost:~# free -h total used free shared buff/cache available Mem: 251G 1.9G 249G 9.2M 260M 248G Swap: 64M 49M 14M There ...
The available memory is just a estimate of how memory can be really used in your system for loading programs, so it is not a precise value. As you probably already knows the normal behavior is to have the available memory bigger than the free memory, but in your case the opposite occurs, because the statistics used ...
Why the available memory is less than the free memory in free command?
1,377,261,966,000
For a while, I encounter RAM-shortages on my Debian webserver (VPS/virtual machine). This would not be unusual, if they happend on a regular basis. But they do not. Here's a chart from Munin:                   To solve such riddles, I tracked my system with atop. Here're two snapshots from 7:00AM and 9:00AM - during a...
Probably your virtual machine is suffering some kind of memory ballooning operation ordered from the virtualization platform. You can try to confirm this by looking for a related module with lsmod (the name changes from one virtualization platform to another, but it should be pretty distinctive). When memory balloonin...
Where has my RAM gone & how to interpret atop's memory output?
1,377,261,966,000
My processor is using a big part of my RAM memory as cache and I want to clean it up because of that; will it prejudice something?
There is no need to do this, the kernel manages RAM efficiently by using it for caches and buffers if it is not needed by processes. If processes request more RAM the kernel will deallocate caches and buffers if necessary to satisfy the request. This ServerFault answer explains how to interpret the memory usage report...
How to clean up the RAM memory that is being used as cache memory?
1,377,261,966,000
My current computer is unable to run FullHD movies smoothly and I was already resigned to the idea, because it seemed a graphics card issue, mine not being powerful enough to do the work (which is still very probable). But recently a friend of mine bought a SSD and put it in a similar specs laptop and he is now able t...
Yes it is possible. You can first mount a tmpfs partition and then play your video file from there. I mount my /tmp partition in RAM since the contents do not need to be preserved between reboots and there are definite speed benefits. Here is my entry in my /etc/fstab which creates it on each boot: tmpfs /t...
Preload movie on RAM
1,558,401,430,000
I reinstalled a fresh debian 10 on an old x86 system with 512MB RAM (everything works ok). Available memory is 431MB. (No graphic card plugged right now) I don't think that that much memory was "reserved" on an old 3.x kernel $ free -m total used free shared buff/cache available...
The SWIOTLB is being enabled on your system. By default this reserves 64M RAM. It is only supposed to be needed if you have more than 4G RAM, and cannot use a hardware IOMMU, or if you are running under Xen virtualization without nested page tables. Congratulations. You found a bug in the kernel :-). Either of the...
82MB of "reserved memory" on 512MB (x86) system
1,558,401,430,000
I' ve just bought new RAM and I'd like to benchmark and compare with my old. How can I do that?
The package hardinfo (http://sourceforge.net/projects/hardinfo.berlios/) is a pretty decent system benchmarker with a nice GUI. The simplest way to compare the two would be to benchmark one save the results and then compare it to your benchmarking of the other. EDIT Depending on your distro, you may already have har...
How to benchmark RAM memory with a Linux Distro?
1,558,401,430,000
I'm looking to lower my boot time by whatever means possible. I have about 8GB of RAM in my laptop, and if there's any way I could leverage that into faster boot time, that'd be awesome. Is there a way to make the kernel load itself and all modules immediately into RAM to make things faster? Does the Linux kernel alre...
Answering precisely to the question: Is there a way to speed things up at boot time?. Yes. Welcome to systemd, this is available on RHEL6 onwards, Fedora 15,16 onwards, CentOS 6 onwards. In other worlds of Linux like Ubuntu -- you would have upstart In other world of Unix like Solaris, BSD, MacOSx: you have SMF Both a...
Is there a way to speed up boot time by loading things into RAM immediately?
1,558,401,430,000
A monitoring system keeps alerting that my machine is reaching/breaking through its RAM utilization threshold which is 15 GBs. I've done some reading and understood that the apparent RAM utilization is not actual and that the extra RAM is used for caching/buffering of disk I/O operation to improve the performance of t...
Since you don't seem to accept neither our opinions not the various pages we have linked to as 'official', perhaps the official Red Hat documentation will convince you: In this example the total amount of available memory is 4040360 KB. 264224 KB are used by processes and 3776136 KB are free for other application...
How to reduce buffers/cache
1,558,401,430,000
Is it true that a single application can not allocate more than 2 GiBs even if the system has GiBs more free memory when using a 32-bit x86 PAE Linux kernel? Is this limit loosened by 64-bit x86 Linux kernels?
A 32-bit process has a 32-bit address space, by definition: “32-bit” means that memory addresses in the process are 32 bits wide, and if you have 232 distinct addresses you can address at most 232 bytes (4GB). A 32-bit Linux kernel can only execute 32-bit processes. Depending on the kernel compilation options, each pr...
How much RAM can an application allocate on 64-bit x86 Linux systems?
1,558,401,430,000
For linux (Ubuntu, Debian, etc), different desktop environments cost different amounts of resources (RAM). Gnome and KDE tend to cost more RAM than others like XFCE / LXDE / LXQT: https://unihost.com/help/how-to-choose-linux-desktop-environment-ram-usage/ I am wondering if I don't log in via the GUI of the desktop env...
If there is no GUI session used, but the system still displays a GUI for login, only this GUI login part will use memory. Processes managing this are mostly waiting and thus mostly doing nothing. If swap if enabled (something to ponder if the only disks available are SSD that have to be preserved from wearing off, any...
If I don't log in the desktop environments, does the desktop enviroment still cost RAM?
1,558,401,430,000
So I look at avaliable to me servers load and see that some other user has created some really ram intensive app that kills my server hosting abileties. I wonder what is bash command to get top 5 most ram using applications n my server. How would such command look like?
You can use ps: ps axo pid,args,pmem,rss,vsz --sort -pmem,-rss,-vsz | head -n 5
How to get top 5 most ram intensive applications from Bash?
1,558,401,430,000
I'm trying to understand the relation between huge page size and how data is actually being written to RAM. What happens when a process uses a 1GB huge page - does writing occur in 1GB chunks? I guessing I'm completely wrong with this assumption?
There is more than one definition of the chunk size for memory writes. You could consider it to be: the width of the store instruction (store byte, store word, …), typically 1, 2, 4, 8 or 16; the width of a cache line, typically something like 16 or 64 bytes (and different cache levels may have different line widths)...
1GB huge page - Is writing occurring in 1GB chunks?
1,558,401,430,000
I am running a Debian Jessie and having memory issues when using Google Chrome I tried disabling extensions, disabling cache, flushing the cache, and disabling the web 3d rendering, but nothing really improves. I am getting huge lags some times and I am really wondering where this is coming from.
If you add up MEM% for all the identical looking chrome processes, then you have well over 100%, which is impossible. That's because those are not, in fact, separate processes, they're threads, which share the same memory space. htop shows these by default, but see here for how to change that and get a view that will...
How to reduce chrome's virtual memory usage?
1,558,401,430,000
I am running grep MemTotal /proc/meminfo to determine the RAM installed on a system, however instead of reporting a number corresponding to an even number of GiB, it is slightly off. I.e. on my 64 GiB system I get a report of 65854272 kiB, which is equivalent to 62.8 GiB. Where did my 1.2 GiB go? Why does the tool not...
MemTotal: Total usable RAM in kilobytes (i.e. physical memory minus a few reserved bytes and the kernel binary code) Source: Torvalds linux github repro (linux/Documentation/filesystems/proc.txt) Check BIOS reserved memory: dmesg | grep BIOS | grep reserved
Why am I missing 2% of my ram
1,558,401,430,000
Today I decided to run top on my Arch Linux laptop, to be greeted with this: In particular, this bothers me: GiB Mem :225809113546752.0/7.791 This number doesn't change with the actual memory consumption. Does anyone have any idea why this occurs?
The problem is known and fixed already - top: protect against the anomalous 'Mem' graph display Until this patch, top falsely assumed that there would always be some (small) amount of physical memory after subtracting 'used' and 'available' from the total. But as the issue referenced below attests, a sum of 'us...
top showing huge number in place of memory percentage
1,558,401,430,000
Running entirely from RAM been done on various distros such as Slax, DamnSmallLinux, and newer Ubuntu versions, and since I have 8GB it seems reasonable that I could run many distros entirely from RAM (as long as I select one that has the ability). I would like to do this with OpenELEC (or any distro), and with a furt...
There's an EXE installer for Puppy Linux which boots from an .iso on FAT32, NTFS or Linux filesystems (i.e. ext2/ext3/ext4, xfs, etc.) using syslinux and runs in RAM using unionfs/aufs with full access to persistent storage (disk, SD, flashdrive, etc.). Other ISOs can be mounted, from commandline or script of course, ...
Is it possible to run any distro from RAM from within an .iso saved on an NTFS file system?
1,558,401,430,000
I'm able to auto detect RAM in GB as below and round off to the nearest integer: printf "%.f\n" $(grep MemTotal /proc/meminfo | awk '$3=="kB"{$2=$2/1024^2;$3="GB";} 1' | awk '{print $2}') Output: 4 I multiply by 2 to determine the required swap as 8GB ans=`expr $(printf "%.f\n" $(grep MemTotal /proc/meminfo | awk '$...
The reason why your dd command didn't work is because you set dd's block size to 8 GB. i.e. you told it to read and write 8 GiB at a time, which would require a RAM buffer of 8 GB. As Marcus said, 8 GiB is more RAM than you have, so a buffer of that size isn't going to work. And ~ 8 billion megabytes (8 GiB x 1M = 8...
Auto detect RAM and create double the swap memory
1,558,401,430,000
About RAM for laptops I did realize that is available ECC Non-ECC Buffered Unbuffered It according with: Kingston Technology KVR16LS11/8 8GB 1600MHz DDR3L (PC3-12800) 1.35V Non-ECC CL11 SODIMM Intel Laptop Memory A-Tech 4GB DDR2 800MHz SODIMM PC2-6400 1.8V CL6 200-Pin Non-ECC Unbuffered Laptop RAM Memory Upgrade Mo...
Run dmidecode -t memory. Handle 0x001A, DMI type 17, 40 bytes Memory Device Array Handle: 0x0019 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 16384 MB Form Factor: DIMM If total Width > Data Width the stick is ECC: Handle 0x004D, DMI type 17, 34 bytes M...
Command(s) to know If the current RAM installed by slot is ECC/Non-ECC and Buffered/Unbuffered
1,558,401,430,000
I have read many controversal statements about ZFS on low memory systems on the internet, but most of the use cases was for performant data storage. I want to use ZFS not for performance reasons, but because it supports transparent compression and deduplication (the latter may be optional) and still seems to be more m...
Short answer: Yes, its possible to use low RAM (~ 1 GB) with ZFS successfully. You should not use dedup, but RAID and compression is usually ok. Once you have duplication enabled, it works for all newly written data and you cannot easily get rid of it. You cannot enable dedup retroactive, because it works on online d...
Reliability of ZFS/ ext4 on ZVOL, used not for performance but for transparent compression, on low memory system?
1,558,401,430,000
I installed 16GB of RAM on a motherboard that shouldn't take it. Should I buy a better motherboard or change anything at all? It seems to be working fine. Memory: Crucial Ballistix Sport "(8GBx2) DDR3 PC3-12800" Board: Asrock N68C-S UCC "Max. capacity of system memory: 8GB" Does gnome-control-center.real info lie? M...
The short story: If your mobo posts, and your system boots, and free/top show your ram as 16 gB, then it works. Even mobo makers can under-report capacity of system boards, so the real test is if ram is installed correctly, matched correctly, runs, ie, boots, and runs with stability, ie, doesn't crash, then it works. ...
Does my system use all available RAM?
1,558,401,430,000
I've heard about the Scrub of Death. However one can disable checksumming in ZFS datasets. If so, will that make the situation safer for a system that's not using ECC RAM? I'm not thinking of a NAS or anything like that - more of a workstation deployment with a single drive just to use the ZFS volume management and sn...
I've heard about the Scrub of Death. You should read this: http://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/ Unless the memory in your system is absolute trash, it will almost certainly have fewer problems than your disks. If your system has an SSD and a "slow" CPU, the performance hit from calcu...
Is ZFS safer with non-ECC RAM if you disable checksums?
1,558,401,430,000
This is a follow up question from Sort large CSV files (90GB), Disk quota exceeded. So now I have two CSV files sorted, as file1.csv and file2.csv each CSV file has 4 columns, e.g. file 1: ID Date Feature Value 01 0501 PRCP 150 01 0502 PRCP 120 02 0501 ARMS 5.6 02 0502 ARMS 5.6 file 2: ID Date Feature Val...
Let's review tools that combine two files together line by line in some way: paste combines two files line by line, without paying attention to the contents. comm combines sorted files, paying attention to identical lines. This can weed out identical lines, but subsequently combining the differing line would require ...
diff two large CSV files (each 90GB) and output to another csv
1,558,401,430,000
Can anybody clarify how support for large address aware (LAA) for 32-bit applications works in Wine? I know that by default in Windows, 32-bit applications are limited to a maximum of 2GB of RAM; however, it is possible to set an LAA flag on the executable, to allow it to use up to 4GB. My understanding is that, by de...
There is a patch that you can install for each x86 application you are trying to run under WINE which you can find here: https://ntcore.com/?page_id=371 Additionally, there is a patch for WINE for setting the LAA flag in PE files. Taking a look at the contents of the files included in the github, it appears you are co...
How does large address aware (LAA) work in Wine?
1,558,401,430,000
Possible Duplicate: Correctly determining memory usage in Linux I see that almost all my RAM is in use. Is this bad? Strange thing is I don't see what is actually using the RAM.
No problem in that. Linux is borrowing the RAM for caching. This is desirable (RAM is faster than disk) and absolutely normal behaviour. From that link: Why does top and free say all my ram is used if it isn't? This is just a misunderstanding of terms. Both you and Linux agree that memory taken by applications is "u...
Shouldn't there be more RAM free than this? [duplicate]
1,558,401,430,000
Situation: I've got a larger (>10GB) read-only collection of small files with loads of duplicates that I need to have available on multiple machines, even on different file systems. We can assume Linux kernel > 5.3.0. One solution would be to put these into a squashfs image file, use deduplication and zstd compression...
Mounting a squashfs file system doesn’t involve decompressing it into memory; decompression is done on the fly, as necessary. There is a small internal cache to avoid repeatedly decompressing the same data, but that’s all. squashfs file systems can store up to 264 bytes of data, so it wouldn’t be practical to decompre...
Does mounting squashfs put the whole filesystem in RAM?
1,558,401,430,000
I have bought new RAM, and it's not detected. In short I got new RAM, 16 GB, to switch my old one, 4 GB + 4 GB. New one isn't detected by my laptop OS(?)/software(?). But when I installed it, it didn't work, I got only 4 GB. Long one I got new RAM, 16 GB, to switch my old one, 4 GB + 4 GB, so it will be 20 GB. But wh...
In summary, one of two things generally happens. The memory works, but is limited to the maximum amount supported by the motherboard, or the memory doesn't work at all. Let me be a bit detail to you. On every motherboard, there is a controller for accessing the RAM. The limiting factor is how much memory can be access...
Mint is not detecting new memory (RAM)
1,558,401,430,000
I am trying to run Docker but I need more memory on my Ubuntu 16.04 free -m total used free shared buff/cache available Mem: 7914 4024 3072 83 817 3448 Swap: 8127 14 8113 When I run docker Setting advertised ...
Use the below command to identify top 10 Memory consuming resources. so that you can trouble accordingly ps axo %mem,command,pid| sort -nr | head To drop cache use below command sync;echo 1 > /proc/sys/vm/drop_caches
How to clear cache,swap and what are the limits?
1,558,401,430,000
I am experiencing a weird issue lately: Sometimes (I cannot reproduce it on purpose), my system is using all its swap, despite there being more than enough free RAM. If this happens, the systems then becomes unresponsive for a couple of minutes, then the OOM killer kills either a "random" process which does not help m...
shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on kernels 2.6.32, displayed as zero if not available)> So the manpage definition of Shared is not as helpful as it could be :(. If the tmpfs use does not reflect this high value of Shared, then the value must represent some process(es) "who d...
Linux using whole swap, becoming unresponsive while there is plenty of free RAM
1,558,401,430,000
I'm trying to prove that an application I developed is saturating the memory bandwidth. For pure bandwidth benchmarking I'm aware that there's STREAM, but it only measures the maximum sequential burst bandwidth in terms of MB/s. I can see the memory transfers/second while using PCM, but I need an external application ...
I've obtained the numbers that I need via SysBench, which can do memory benchmarks with random access and with small blocks down to 1KiB in size.
Flexible RAM Benchmarking Tool
1,558,401,430,000
When I download a lot of data (e.g. 3GB) in one go, using a program such as Transmission or Wget, progressively during the downloading, and after it has has finished, the computer always seems slightly sluggish, as though it's been using swap. However, the result of free always shows 0 bytes of swap used, both during ...
The RAM in a computer is useful for two things: to store the memory of programs, and as a cache of recently-used disk content. On a typical healthy desktop system, about half the memory goes into each. You can check your memory usage with the free command; the “used” column of the “-/+ buffers/cache” is the figure fo...
Why is my computer sluggish after downloading a lot?
1,558,401,430,000
I have 2 instances of vlc running. One is playing. One is paused (and mostly swapped out). top - 14:25:01 up 23 days, 19:19, 69 users, load average: 2.36, 2.61, 4.19 Tasks: 905 total, 3 running, 894 sleeping, 2 stopped, 6 zombie %Cpu(s): 11.9 us, 6.5 sy, 0.1 ni, 81.0 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st GiB...
I found the culprit: Tools > Preferences > Show settings > All > Playlist > Automatically preparse items If this is on, VLC will read each file in the playlist and find the length of the video. Apparently it also reads much more. My problem disappears (and VLC stays below 200 MB) when disabling it and reappears when e...
VLC takes up 600 MB RAM. Why?
1,558,401,430,000
I have a nice laptop - 32 GB of RAM, M2 (SATA) and 2.5' SSD (also SATA) - dual boot, Fedora 33 & Windows 2019 Server. I ran dmidecode and found a Maximum Capacity of 64GB - but the manufacturer (ASUS) says 32GB is the max! Now, I know that dmidecode isn't perfect, but I want to hear from those who have upgraded their ...
Ecample: 4 socket supermicro server with 512GB of installed RAM, which is done via 32 x 16gb DIMMS. dmidecode | grep "Maximum Capacity" Maximum Capacity: 384 GB Maximum Capacity: 384 GB Maximum Capacity: 384 GB Maximum Capacity: 384 GB Maximum Capacity: 384 GB Maximum Capacity: 384 GB Maxim...
Maximum RAM - do I listen to dmidecode or the manufacturer?
1,431,696,284,000
I have a computer with a Windows 7 and a Debian OS disk partition. The computer has 12GB ram as can be seen when logged in on the Windows 7 OS. However, the Debian partition is only recognizing just under 4GB ram. Why would this be, and how can I fix this? When I run the "free" command I see the reduced RAM amount as...
4GB of memory requires 32 bits to store addresses. Most 32-bit processor architectures can only address 4GB of memory, and older x86 CPUs are no exception. More recent 32-bit x86 CPUs can access more than 4GB of physical memory through a processor feature called PAE.¹ 64-bit x86 CPUs always have PAE. PAE requires a Li...
All of system ram not available on Debian OS partition
1,431,696,284,000
I read from here that I could load file into RAM for faster accessing using the below command. cat filename > /dev/null However, I wanted to test if the above statement is really true. So, I did the below testing. Create a 2.5 GB test file as below. dd if=/dev/zero of=demo.txt bs=100M count=10 Now, calculated the...
Nope nope nope! This is not how it is done. Linux (the kernel) can choose to put some files in the cache and to remove them whenever it wants. You really can't be sure that anything is in the cache or not. And this command won't change that (a lot). The advice in the link you provided is so wrong in so many ways! The...
file access time after loading file into the cache
1,431,696,284,000
When I check my CPU Cache with command dmidecode, I get Cache configuration to be Not Socketed. What does that mean? prayag@prayag:~/hacker_/draobkcalb$ sudo dmidecode -t cache # dmidecode 2.11 SMBIOS 2.5 present. Handle 0x000A, DMI type 7, 19 bytes Cache Information Socket Designation: Internal Cache Configu...
According to the relevant dmidecode source code, the information presented by the program comes from the DTMF SMBIOS documentation that you can find here. On page 59 of the 2.8.0 version of the SMBIOS spec, the reference to the bits, tested for by dmidecode, is given, but without a clear definition of what 'socketed'...
External Cache not socketed
1,431,696,284,000
I am running unzip to unzip huge files. However, my cpu usage is under 15 percent and ram is only utilizing 1-1.2 GB out of 8 GB. Is there a way to allocate more cpu power and ram to this unzip program? Thank you. I am on Lubuntu 16.04
Programs take all the memory and CPU power they can get, unless they have built-in limitations. unzip has no such built-in limitations. You could give it less, but you can't give it more, because by default it's allowed to take as much as it wants. Unzipping is not a memory-intensive process. The main memory cost of u...
Allocate more memory and cpu resources to a program
1,431,696,284,000
I used to have two RAM sticks, of 8GB each. I switched one of them for a 16G stick, and expected I would now have a total of 24GB but I have 20GB instead. The result of free -h: total used free shared buff/cache available Mem: 19Gi 2.8Gi 12Gi 105Mi ...
According to your posted logs and described behavior, I believe your AMD Ryzen 7 5700U is also an integrated graphics card which does not have its own RAM. There may be an option in your BIOS to adjust the integrated graphics VRAM which will take RAM away from your installed system RAM. Your logs currently show that 4...
Linux see 20GB ram instead of 24 GB
1,431,696,284,000
Recently, I dumped my memory strings (just because I could) using sudo cat /dev/mem | strings. Upon reviewing this dump, I noticed some very interesting things: .symtab .strtab .shstrtab .note.gnu.build-id .rela.text .rela.init.text .rela.text.unlikely .rela.exit.text .rela__ksymtab .rela__ksymtab_gpl .rela__kcrctab ...
These look very much like section names from the Linux kernel. The ones prefixed by .rela contain relocation information for the named section, e.g. .rela.text is the relocation information for the text section (where kernel object code is stored). Other sections of interest are: .modinfo - kernel module information...
What are these memory strings? What do they do? [duplicate]
1,431,696,284,000
I have an Intel 11700 with 4*32 GB RAM. When 4 physical RAM slots are filled, BIOS, htop, sudo lshw, sudo dmidecode dmesg (whatever command I use to display the total RAM on the system) all display that I have 128 GB RAM. However, I can only use 57.2 GB, i.e. approximately half of the available RAM. I tested this by u...
Having malloc fail, especially at 50% occupation, is a symptom of strict allocations, i.e. disabled overcommit. This is controlled by the vm.overcommit_memory sysctl, and can be seen with sysctl vm.overcommit_memory If that indicates 2, the kernel will prevent overcommits, so heap resizes, mmaps etc. will fail when a...
Why I can only access half of RAM whatever the total is?
1,431,696,284,000
I have 2x 4GB(8GB) RAM installed on my motherboard and BIOS/UEFI can confirm it, but on Ubuntu 14.04 64bit only has 3424776kB or 3.266120911GB. uname -a returns: 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Through search, someone said about memory remapping but I can't ...
Looks like the issue is related to the updates and broken mirrors. Changed the mirror I'm using to a different one, updates were successful. After a reboot, performance became smooth and when I checked the RAM it already has 7.2GB(looks like AMD APU uses RAM too).
Using only 3.3GB but I have 8GB RAM even on Ubuntu 14.04 64bit