84 questions
1
vote
1
answer
202
views
How do I avoid memory being swapped in Rust?
TLDR: I have a huge array (around 70% of available memory) and I don't want it to be swapped to disk. What's the best way on modern linux to pin a vector in memory so that it doesn't get swapped by ...
1
vote
0
answers
476
views
Automatically show diff of file and its swap file in neovim
When I have some work in neovim after it being closed without saving it will be stored in swap file. When I open the same file in neovim I am welcomed with this message:
E325: ATTENTION
Found a swap ...
2
votes
1
answer
561
views
Why did Vim create a constantly growing .swp file?
Someone had opened vi via ssh, and pasted output into a buffer, and then later closed / crashed that terminal. The system was later discovered to be out of disk.
Self-answering.
Prior unaddressed ...
0
votes
1
answer
338
views
Custom Node Configuration in AKS using Terraform
I wanted to create noodpool with swap memory enabled in AKS, I have gone through
Terraform documentation there I can see swap_file_size_mb and vm_swappiness are the only thing related to swap. My ...
0
votes
1
answer
2k
views
Error writing lock file: Permission denied
After connecting my NAS drive with the mount command in the nashome directory,
the following error occurs, when trying to edit or create any file in the mounted directory tree:
[ Error writing lock ...
1
vote
0
answers
160
views
Where accessing swap space is handled in Linux kernel?
I am working as research assistant and this question is really vital for our group:
We are looking for a way to inject delays when a process (i.e. a python program) is using swap space. For example, ...
1
vote
1
answer
717
views
How to make use of swap space on disk when run out of modern gpu memory?
Post-Pascal UM can allocate more memory than the GPU memory, which swap-in swap-out between GPU memory and host memory automatically.
So what if run out of GPU memory and host memory? How can I use ...
-1
votes
1
answer
169
views
How To implement swapfile cross operating system
There are use cases where I can't have a lot of ram, and sometimes due to docker based services doesn't always provide more than 512mb/1gb of ram, or if I run multiple rust based gui apps and if each ...
0
votes
1
answer
2k
views
I need docker instance to NOT utilize the host swap
My server build uses a lot of swap per container and I am told that docker uses the host swap for instances. My host ssd is only 256gb and is only intended to run the OS. I have setup a zfs pool (9 Tb ...
0
votes
0
answers
164
views
Make a copy of swapfile.sys to new location [File not found error]
In PowerShell, I am trying to make a copy of the Windows swapfile (swapfile.sys)
PS C:\> Copy-Item swapfile.sys -Destination C:\Users\
However, I recieve the error:
Copy-Item : Cannot find path 'C:...
1
vote
3
answers
728
views
Can I create an array exceeding RAM, if I have enough swap memory?
Let's say I have 8 Gigabytes of RAM and 16 Gigabytes of swap memory. Can I allocate a 20 Gigabyte array there in C? If yes, how is it possible? What would that memory layout look like?
0
votes
1
answer
943
views
How to get vim to list the PIDs of selected files that are presently being edited, avoiding recovery mode, and not list all the other files
The vim manual page contains two similar -r type commands. I'll give more background below, this question is really how to invoke the first type of -r to list the swap files, but avoid the second -r ...
1
vote
1
answer
2k
views
How to create swap partition/file on a Yocto distribution
I'm trying to create a swap partition/file on my board where a core-image-minimal has been installed.
The fdisk -l command doesn't show any partition thus I'm not able to figure out which block device ...
0
votes
2
answers
1k
views
Move REDIS data between memory and disk
REDIS is a memory database, it's easy to fill the entire memory though.
My question is, how can I expand the space by storing some data on disk?
Can the memory be expanded with GNU/Linux swap?
What's ...
0
votes
1
answer
452
views
R eats up all RAM, then all swap, and the suddenly closes
I am using the mediation package to run a mediation analysis.
But when I call the mediate function, R eats up all RAM, then it eats up all swap, and then RStudio suddenly closes.
The same happens if I ...
0
votes
0
answers
219
views
Is there a way to force a hard RAM-usage limit for R, resulting in it using swap space after it is hit?
There is a memory-management process on a server I use that kills processes that go above a certain limit.
There are very large data files that must be loaded in their entirety, but doing so goes ...
0
votes
0
answers
2k
views
configuring a swap space in a guest running under qemu
I have followed this link to set up a kernel development environment. In summary, I am running a Linux kernel 5.11.5 with a custom root file system. I am using buildroot to creating a root file system....
0
votes
1
answer
637
views
CentOS 7: LVM swap extension not shown by the "free" command
I'm running a CentOS 7 guest on a VirtualBox 6 on Windows. The result of the free command is as follows:
$ free -h
total used free shared buff/cache available
Mem: ...
2
votes
1
answer
666
views
Dotnet Core Will Not Use Swap
I've written a simple dotnet app that allocates memory. It uses up all the physical memory on the machine and then crashes with an OutOfMemoryException. However my system has a swap file and it is ...
0
votes
1
answer
94
views
How to view paging system (demand paging) as another layer of cache?
I tried solving the following question
Consider a machine with 128MiB (i.e. 2^27 bytes) of main memory and an MMU which has a page size of 8KiB (i.e.2^13 bytes). The operating system provides demand ...
0
votes
1
answer
114
views
How to find the unique swap page by virtual address when page fault
For example, if there are 3 processes, each using the virtual address 0x400000 for text section. And there is only one 4KB physical page for user process.
Suppose process 0 is using the physical page (...
-1
votes
1
answer
955
views
Make java understand that swap exists, and encourage him to use it [closed]
So, I have a java jar to run on my raspberry pi, and it requires a lot of memory. I have set up 2 gb swap on an external usb flash drive. But when I start the jar with -Xmx2048M, it says that it could ...
0
votes
0
answers
1k
views
Is using swap space a good idea in a python program?
I am currently writing a python program that uses up a lot of RAM. I am aware that I could use the garbage collector to "free up" the ram and avoid this problem. However, I am using Numba to ...
2
votes
1
answer
2k
views
vim recover a deleted swap file
I deleted the swap file and lost the modifications. The *.bash file returned to its original version. Is it possible to undo delete of the swap file (i.e., recover or restore the deleted *.bash.swp ...
1
vote
1
answer
128
views
Why is vim not working properly after a file recover?
I went to open a log file in vim, but was warned that a swap file had been found. One of the warnings suggested that I might want to open the file using vim -r filename.log. I did that, but now when ...
2
votes
1
answer
1k
views
Google Cloud Compute Engine not activating swap memory and cannot ssh to fix
Recently, I've been unable to access the VM. I've looked through the console logs on the instance page, and I'm confident that the reason I am unable to ssh into the instance is that there isn't ...
0
votes
1
answer
943
views
How to get around Memory Error when using Pandas?
I know that Memors Error is a common error when using different functions of the Pandas library.
I want to get help in several areas. My questions are formulated below, after describing the problem.
...
1
vote
1
answer
2k
views
How to prevent chrome from using up my memory and swap space on Linux?
My laptop (running Xubuntu 16.04) is a few years old, on an i7-3635QM processor. 3-4 yr ago, it had only 4GB ram, and the chrome browser often completely used up the physical memory and started using ...
1
vote
0
answers
2k
views
How to clear swap file in Ubuntu?
I have a Digital Ocean droplet on which running free -h shows the following:
total used free shared buff/cache available
Mem: 3.9G 3.1G 735M ...
4
votes
2
answers
3k
views
How to enable swap/swapfile on Google container optimized OS on GCE?
Using the cos-stable container optimized OS on GCE. Micro instance so ram is pretty sparse. Tried to enable swap to prevent locking due to OOM during docker pulls, but can't get it to work.
I realize ...
2
votes
0
answers
2k
views
How disable Docker swap for Windows 10?
A lot of answers lead to the docker run command and the --memory-swap parameter. But how to do this once for all containers? There are Windows settings, but the swap parameter cannot be set to less ...
1
vote
1
answer
512
views
How can I see the option in Vim to "[D]elete" a swap file?
When I open a file for which Vim sees that there is a swap file present, it warns me and gives me some options, like "[A]bort" and "[E]dit anyways". However, one option it used to show me but no ...
-1
votes
2
answers
777
views
Computer freezes when running compilation
OS: Ubuntu 14.04, 4GB ram, i5, 1.5 GB swap space
I'm running a compilation command ./build.sh , however, the computer keeps on freezing during running it. I checked the RAM, CPU and Swap Space usage ...
9
votes
1
answer
43k
views
Can I Extend the Swap in macOS? [closed]
I have a 2017 model of Macbook Pro 13-inch with 8 Gigs of RAM. I want to have some "extra" memory by using swap, because I want to create some virtual machines that need lots of memory. I have read ...
1
vote
0
answers
87
views
about LRU, How can the operating system know about a memory frame use when it's valid
In virtual memory, The LRU algorithm is about swapping out page frame which has been the least recently used, but how can the OS know about a frame use since it wont be raising any exception when it ...
1
vote
1
answer
585
views
Linux `top` command: how much process memory is physically stored in swap space?
Let's say I run my program on a 64-bit Linux machine with 64 Gb of RAM. In my very small C program immediately after the start I do
void *p = sbrk(1024ull * 1024 * 1024 * 120);
this moving my data ...
1
vote
2
answers
1k
views
Detecting low memory situations in Embedded Linux
My team develops a complex multiprocess C++ based system running on Embedded Linux. Since there is no swap partition, a gradually growing memory leak can cause major trouble. (Let's assume for the ...
1
vote
1
answer
809
views
OSRM extract and best swap stxxl location on 2 HDs
I want to set up the car profile data, but it is now taking 3 days and still at 100% Graphs (so way more to go) and I am thinking, maybe my swap and stxxl is just set up inappropriately.
I have the ...
5
votes
2
answers
5k
views
Swap file returns to original size after reboot
I am trying to increase swapfile size on my raspberry pi 3.
I'm following this guide here on DigitalOcean.
After successfully increasing the file and setting it up using mkswap and swpon commands ...
2
votes
1
answer
2k
views
Swapping out a specific page in LINUX KERNEL
I am using add_to_swap to swap out a specific page. However, even after I have called this function, which returns success (1), the system that shows that the page table entry pte_t is still present. ...
0
votes
1
answer
394
views
Swapping IN a page in Linux
I have identified that the function do_swap_page in mm/memory.c is used to swap IN pages in the Linux kernel. However, the input parameters of this function contains one pte_t* and one pte_t. What is ...
0
votes
0
answers
36
views
Why is it problematic to configure the database files and the system swap space on same disk?
Why is it problematic to configure the database files and the system swap space on the same disk? What can happen?
4
votes
1
answer
6k
views
Can a Nodejs process uses more memory than the available physical memory (by using swap memory)?
I am using Nodejs. I am planning to increase the memory limit of a Nodejs application.
While googling, I found this article: Increasing Node.js memory limits.
The author says his server only has 8GB ...
5
votes
2
answers
3k
views
Creating a Swap Partition in AWS/EC2
I have a t2.micro Ubuntu Server 1GB RAM and 30GB Hard Drive (HD). I am in need to take 2GB out of the 30GB HD in order to create a Swap partition. Could someone give me a help on how to that?
I have ...
0
votes
0
answers
95
views
virtual memory on windows
I am developing a program which use huge ram size. Unfortunately there is no way to decrease it. In linux when ram is low I can generate a swap file and mount it to system that solve my problem but in ...
9
votes
1
answer
3k
views
Can I configure Linux swap space on AWS Elastic Beanstalk?
Can I configure Linux swap space for an AWS Elastic Beanstalk environment?
I don't see an option for it in the console. From looking at /proc/meminfo on my running instances in my environment ...
0
votes
1
answer
359
views
Unable to compile graph-tool even after creating swap file
I am trying to install graph-tool on my laptop with 4GB RAM. I realized that the RAM is not sufficient and so I created a swap file of size 4GB using the instructions given here. However, I still keep ...
1
vote
2
answers
477
views
Systemd unit file for swapon does not run on boot
I have a systemd unit file that does swapon, but it doesn't seem to run on each boot even though it's enabled.
Here are the contents of my swapon.service:
[Unit]
Description=Turn on swap
[Service]
...
3
votes
2
answers
18k
views
Does Linux have a page file? [closed]
I found at several places that Linux uses pages and a paging mechanism but I didn't find anywhere where this file is or how to configure it.
All the information I found is about the Linux swap file / ...
3
votes
0
answers
320
views
File-Mapped Memory (extended swap space)?
I have an image-processing set of tools that may end up consuming incredibly large amounts of memory because it is used to process images that are massive (~50k x 50k x 1000 -> 2.5 terapixel). While I ...