--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I should clarify we run with swap enabled similar to the unit file posted in the link supplied: https://github.com/coreos/docs/issues/52
[Unit]
Description=on disk swap file
[Service]
Type=oneshot
Environment="SWAPFILE=/coreos.swap"
Environment="SWAPSIZE=2048"
RemainAfterExit=true
ExecStartPre=/usr/bin/touch ${SWAPFILE}
ExecStartPre=/usr/bin/fallocate -l ${SWAPSIZE}m ${SWAPFILE}
ExecStartPre=/usr/bin/chmod 600 ${SWAPFILE}
ExecStartPre=/usr/sbin/mkswap ${SWAPFILE}
ExecStartPre=/usr/sbin/losetup -f ${SWAPFILE}
ExecStart=/usr/bin/sh -c "/sbin/swapon $(/usr/sbin/losetup -j ${SWAPFILE} | /usr/bin/cut -d : -f 1)"
ExecStop=/usr/bin/sh -c "/sbin/swapoff $(/usr/sbin/losetup -j ${SWAPFILE} | /usr/bin/cut -d : -f 1)"
ExecStopPost=/usr/bin/sh -c "/usr/sbin/losetup -d $(/usr/sbin/losetup -j ${SWAPFILE} | /usr/bin/cut -d : -f 1)"
ExecStopPost=/usr/bin/rm ${SWAPFILE}
[X-Fleet]
Global=true
On Monday, October 24, 2016 at 2:50:24 PM UTC-5, Eric Anderson wrote:I should clarify we run with swap enabled similar to the unit file posted in the link supplied: https://github.com/coreos/docs/issues/52
Curious you reference whether we have swap enabled or not. After years of running Solaris, FreeBSD and Linux, some habits are hard to break. Thus, we have swap enabled via a fleet wide unit file:
We noticed that on a stand alone bare metal server running CoreOS 1022.3.0, that the same stress tests did not lock up the server. We also noticed that this bare metal server had no swap enabled. We enabled swap on this bare metal server and we were able to quickly lock up the server. We tested the VM again with swap disabled and no lock up.
I tried both "volatile" and "none" and neither fixed the issue. I looked further at an older issue (https://github.com/coreos/bugs/issues/429) and somebody there suggested doing away with "losetup" as part of the swap creation process (which we were using). We did that and the system is now much more stable (now lockups). I am glad we had this discussion though as it makes us re-evaluate our need to have swap available.