Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

swap

Is there a standardized method to swap two variables in Python?

August 21, 2022 by Magenaut

In Python, I’ve seen two variable values swapped using this syntax:

Categories Python, Q&A Tags conventions, python, swap, syntax Leave a comment

Understand Python swapping: why is a, b = b, a not always equivalent to b, a = a, b?

August 12, 2022 by Magenaut

As we all know, the pythonic way to swap the values of two items a and b is

Categories Python, Q&A Tags indexing, list, python, python-3.x, swap Leave a comment

What NOT to put on an SSD?

August 11, 2022 by Magenaut

I bought an SSD and I am going to set up my desktop system with a completely fresh Linux installation.

Categories Q&A, Unix & Linux Tags flash-memory, hard-disk, ssd, swap Leave a comment

Why does Linux need swap space in a VM?

August 11, 2022 by Magenaut

Linux VM running nginx (or any other light-weight daemon with stable resource usage). VM is allocated 2GB of memory with 200-300MB used by OS and services with the rest for file cache and buffers. In one specific use-case I expect an easy 500MB overhead.

Categories Q&A, Unix & Linux Tags swap Leave a comment

Why does swappiness not work?

August 11, 2022 by Magenaut

We have a RHEL 7 machine, with only 2G of available RAM:

Categories Q&A, Unix & Linux Tags free, linux, memory, rhel, swap Leave a comment

How to re-load all running applications from swap space into RAM?

August 11, 2022 by Magenaut

If my desktop run out of memory and swaps a lot then I free or kill the application wasting my RAM. But, after that, all my desktop/applications have been swapped and are horribly slow, do you know a way to “unswap” (reload from swap space into RAM) my desktop/applications?

Categories Q&A, Unix & Linux Tags desktop, linux, memory, swap Leave a comment

How to safely turn off swap permanently and reclaim the space? (on Debian Jessie)

August 11, 2022 by Magenaut

I installed Debian Jessie with default partitioning on my SSD drive. My current disk partitioning looks like this:

Categories Q&A, Unix & Linux Tags debian, filesystems, linux, partition, swap Leave a comment

How can I create a swap file?

August 10, 2022 by Magenaut

I know how to create and use a swap partition but can I also use a file instead?

Categories Q&A, Unix & Linux Tags linux, swap Leave a comment

Does Linux perform “opportunistic swapping”, or is it a myth?

August 10, 2022 by Magenaut

Suppose a program asks for some memory, but there is not enough free memory left. There are several different ways Linux could respond. One response is to select some other used memory, which has not been accessed recently, and move this inactive memory to swap.

Categories Q&A, Unix & Linux Tags linux, memory, swap Leave a comment

How to test swap partition

August 10, 2022 by Magenaut

I’m trying to diagnose some random segfaults on a headless server and one thing that seems curious is that they only seem to happen under memory pressure and my swap size will not go above 0.

Categories Q&A, Unix & Linux Tags linux, swap Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress