Why my swap area is set to zero in Ubuntu Server 18.04.2?

By checking the swap size in my Ubuntu server I observed that is set to zero. Since it was installed in very basic configuration from AWS EC2, I’m not sure if I had to do additional steps to adjust swap size area.

I run the following commands and got the below results :

# grep Swap /proc/meminfo    SwapCached:            0 kB    SwapTotal:             0 kB    SwapFree:              0 kB  # swapon -s   #  free -m                  total        used        free      shared  buff/cache   available Mem:           7975         187        7059           0         728        7549 Swap:             0           0           0 

Is it normal to have a swap area set to zero ? If it is not, what should I do to fix it ?

Thanks !

Swap size

If you are doing partition on dedicated server the swap size should be * 1.5 for 16gig ram?


… | Read the rest of http://www.webhostingtalk.com/showthread.php?t=1776797&goto=newpost

Increased swap file size and now it doesn’t get used

I increased my swap file size using instructions in this link and now it has stopped being used. I actually tried it a few times and it has happened every time. When I ran swapon -s after each attempt, the swap file’s priority always showed -2 so I increased it to 100 but that didn’t help either.

swapon -s and free -m output screenshot

How can I fix this? I have 16GB ram and increased the swap file size to 32GB.

hibernate after image load from swap Laptop starts new

I’m running bionic with xfce4-session on

sudo dmidecode -t1 # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.7 present.  Handle 0x000E, DMI type 1, 27 bytes System Information     Manufacturer: LENOVO     Product Name: 2350B58     Version: ThinkPad T430     Serial Number: PBVVBLH     UUID: CDCB8A01-5190-11CB-9490-98976E1F3194     Wake-up Type: Power Switch     SKU Number: LENOVO_MT_2350     Family: ThinkPad T430 

on bios mode with tlp. Nothing is encrypted.

pkexec  /usr/lib/i386-linux-gnu/xfce4/session/xfsm-shutdown-helper --hibernate 

and with sudo systemctl hibernate

In both cases, ubuntu tells load successfully image, suddenly I see thinkpad uefisplash as the Notebook lost power.

   echo; for i in --suspend --hibernate --suspend-hybrid; do pm-is-supported $  i && echo "$  (echo $  i | tr [:lower:] [:upper:] | tr -d -) is supported"; done; echo   SUSPEND is supported HIBERNATE is supported SUSPENDHYBRID is supported 

Running Kernel and options.

 cat /proc/cmdline  BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic root=UUID=0ddc8e0a-4b8a-479c-9502-5478ed3c4036 ro noplymouth resume=UUID=927f38a0-c962-47de-9361-f1730032704e 

and cat /etc/initramfs-tools/conf.d/resume RESUME=UUID=927f38a0-c962-47de-9361-f1730032704e

    cat /etc/fstab | grep swap | egrep -v '#' UUID=927f38a0-c962-47de-9361-f1730032704e none  swap    sw              0       0 

Ubuntu 16.04 barely using swap

I am trying to setup a server with 4Gb ram using 32bit Ubuntu 16.04 LTS and I ran into an interesting problem that I hope I can get some help with.

I am trying to process some large data files on this new server with python, but python crashes with a memory error (it runs our of ram). I have setup a swap partition with multiple GB’s worth of memory but the server barely uses the swap.

Barely is the important word here since roughly 80 Mb worth of swap is being used. Therefore I think (please correct me if I am wrong here) that the swap is setup correctly since the system is using it.

Now I have tried to play with the swapiness, but that does not seem to help (the current value is 100).

The processing of these large data files happens at night and therefore low performance due to swap usage is not a problem.

Would anybody be able to explain to me why Ubuntu might not use it’s swap memory and just throw a memory error?

Thanks in advance,

Cheers, Hilbert

Keeps booting into emergency mode, swap errors

Moved my media server over to a new case last nigth and ever since it will only boot into emergency mode. I am also getting “failed to activate swap /swapfile” error as posted here. I have a 120 GB M2 SSD as the system drive with 2 partitions. I also have a HDD that has my media files on it.


Here is output of cat /etc/fstab – I know it’s wrong – but it is in read only mode. I also don’t know how to find the UUID of the extra HDD

cat /etc/fstab

I know there is likely more info needed – please let me know

Can a Tomelock swap the Book of Ancient Secrets invocation with itself upon level-up, and gain more than two ritual spells that way?

Eldritch Invocations (PHB, p. 107):

…Additionally, when you gain a level in this class, you can choose one of the invocations you know and replace it with another invocation that you could learn at that level.

Book of Ancient Secrets (BoAS) (PHB, p. 110):

Prerequisite: Pact of the Tome

You can now inscribe magical rituals in your Book of Shadows. Choose two 1st-level spells that have the ritual tag from any class’s spell list (the two needn’t be from the same list). The spells appear in the book and don’t count against the number of spells you know. With your Book of Shadows in hand, you can cast the chosen spells as rituals. You can’t cast the spells except as rituals, unless you’ve learned them by some other means. You can also cast a warlock spell you know as a ritual if it has the ritual tag.

On your adventures, you can add other ritual spells to your Book of Shadows. When you find such a spell, you can add it to the book if the spell’s level is equal to or less than half your warlock level (rounded up) and if you can spare the time to transcribe the spell. For each level of the spell, the transcription process takes 2 hours and costs 50 gp for the rare inks needed to inscribe it.

Assuming that the DM rules that the Rituals learned by BoAS don’t vanish upon dismissing (old) BoAS:

Is it possible by RAW to gain two new ritual spells with every warlock level by switching the BoAS invocation with the BoAS invocation upon level-up?


Assuming that the DM rules that the spells learned from BoAS vanish:

Can a warlock copy a spell from his Book of Shadows to his Book of Shadows and preserve the Spells in this way to get more ritual spells by switching BoAS with BoAS on level-up?

LinuxLite Ram blow but swap still 0

Im using Linux Lite in a old notebook to play Minecraft with my little boy.

I made one machine install and every thing works fine, but second machine I suffer with a strange swap problem.

As I know Minecraft Java Edition uses a lot of ram and I can set the amount to reserve for java while starting game.

When I reserve 2GB for java the game loads and I can start play almost all Ram in use and only few mb used in swap.

Swap usage

Different from another machine that swaps grow im a way that seems normal to me like 600, 700, 900MB and keeps a secure amount of ram free. Already tried others swapiness combinations like 10 20 50 70 90, but nothing changes. A see a curious thing in Gparted the swap partition still off and I must enable it with swapon command

Partition boots like this: Swap off when boot

And then after right click swapon the swap is mounted and appears available in htop.

Noticed another strange info at Disks app. the swap allways show as unknow. mounted or umounted state. Unknow Partition

Btw I read something about this distro using a swap file instead partition, but I guess indifferent of type they should appears in use at htop.

Someone can guide me a direction. Im newby in linux but Im not give up a good fight. I really like that in linux.

Thanks you all.

This is a plain swap of 64-bit integers on 64-bit ARM, using inline assembly in gcc, but it needs to be in clang

I’d like to get an opinion for this, which I found in BDE and modified.

I need the fastest 64-bit integer swap possible. This is for a mobile application used by a lot of people, so I want to create a template specialization for this (in addition to std::swap() ) and integrate it into the C++ std library for our platform.

I’m not sure about how to port this to clang 7. It builds fine with gcc. Any advice would be appreciated..

inline int64_t swapInt64(int64_t *atomicInt,               int64_t swapValue) {     int64_t oldValue;     int rc;      // Clang doesn't support register     // pairs that represent a 64bit value.  So instead of 'ldrexd %1, %H1, [%3]'     // the exact registers have to be specified, as in 'ldrexd r2, r3, [%3]'.      asm volatile (         "1:     ldrexd  r2, r3, [%4]           \n\t"         "       mov     %[old1], r2            \n\t"         "       mov     %[old2], r3            \n\t"         "       mov     r2, %[val1]            \n\t"         "       mov     r3, %[val2]            \n\t"         "       strexd  %[rc], r2, r3, [%4]    \n\t"                 : [rc]   "=&r" (rc),                   [old1] "=&r" (((Int64_Words &) oldValue).w1),                   [old2] "=&r" (((Int64_Words &) oldValue).w2),                          "+Qo" (*atomicInt)                 :        "r"   (atomicInt),                   [val1] "r"   (((Int64_Words &) swapValue).w1),                   [val2] "r"   (((Int64_Words &) swapValue).w2)                 : "r2", "r3", "cc", "memory");      return oldValue; }