abdullah921 Absent Member.
Absent Member.
1127 views

Swap Partition in Sentinel Server


Hi All,

It's normal when swap partition in sentinel server 0 MB?

[image: http://s24.postimg.org/mp5v04xzp/screenshot.png]

Thanks And Best Regards,
Abdullah


--
abdullah92
------------------------------------------------------------------------
abdullah92's Profile: https://forums.netiq.com/member.php?userid=11344
View this thread: https://forums.netiq.com/showthread.php?t=55717

0 Likes
20 Replies
ScorpionSting Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

Not ideal....what is in your /etc/fstab file?

The swap partition is similar to the pagefile.sys on Windows so may impact performance and stability if not available.

Visit my Website for links to Cool Solution articles.
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

Also do a:

cat /proc/sys/vm/swappiness

Visit my Website for links to Cool Solution articles.
0 Likes
abdullah921 Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server


Hi ScorpionSting,

Here is my /etc/fstab file and the result of cat
/proc/sys/vm/swappiness

[image: http://s24.postimg.org/689k4hkid/swap2.png]

How to fix this issue?

Thanks And Best Regards,
Abdullah



ScorpionSting;266917 Wrote:
> Also do a:
>
>
> Code:
> --------------------
> cat /proc/sys/vm/swappiness
> --------------------
>
>
> --
> -"Also now available in 'G+'
> (http://plus.google.com/+BenWalter-Kiwi) and 'Website'
> (https://www.isam.kiwi/) format".- 😉
> ------------------------------------------------------------------------
> ScorpionSting's Profile:
> https://forums.novell.com/member.php?userid=1663
> View this thread: https://forums.novell.com/showthread.php?t=497873



--
abdullah92
------------------------------------------------------------------------
abdullah92's Profile: https://forums.netiq.com/member.php?userid=11344
View this thread: https://forums.netiq.com/showthread.php?t=55717

0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

Yeah, its set to try and use swap when 40% of memory is used...so this will cause you issues... I'm guessing this a physical server based on the disk scsi id's....???

Ifr you run

yast disk


Do you have any unallocated space you can assign up to 8GB for swap?

Visit my Website for links to Cool Solution articles.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Swap Partition in Sentinel Server

On 04/13/2016 07:34 PM, abdullah92 wrote:
>
> Hi All,
>
> It's normal when swap partition in sentinel server 0 MB?


Normal to have no swap at all? Not really, but it's not really a problem
either, that is unless you run out of RAM. If you do run out of RAM, or
if you just want to use RAM for something else, swap can be used instead
(virtual memory) but the the huge caveat that, being on disk, it is
several orders of magnitude slower (both in terms of seek times and
throughput) than real RAM.

Since processes do not know what kind of "virtual memory" they are
accessing most of the time (few people code that way these days)
application performance, particular apps that use a lot of RAM as Sentinel
can (Correlation, searching/reporting, etc.) will suffer to the point
where you may be inclined to reboot the box to recover, which is a
terrible "solution" to a symptom, not the root cause.

I still usually setup swap on production systems as a just in case, but
usually only a couple GiB so that there is some in a pinch. Once setup,
it is seldom heavily used because that would either mean I had my
swappiness set too liberally, or it would mean the system does not have
enough RAM. vmstat provides good information on how much swap is being
used actively (vs. just being used from time to time to hold things
too-stale to bother with in RAM).


vmstat 1 100 #Will show stats 100 times, once per second


You can also see current use of swap, and memory in general, on a system
using the 'free' ('free -m' to see megabytes) command.

You can either add a new disk (virtual or physical), carve out space from
your current disk if you have room, or even add swap via a file in the
filesystem (unless you're using BtrFS currently, which you are likely not
since Sentinel does not support it).

While you have those options, unless you are experiencing a problem right
now, I'd just ignore it and maybe schedule expanding a disk (if virtual)
or adding a tiny bit of space (LUN or virtual disk) during a maintenance
window and then turn that new space into swap. Add it in via Yast's
Partitioner tool. If you think you need it right now, add a swapfile to
your current system and you can turn it on at any time after verifying you
have enough space in a location to use up a couple of GiBs as shown below
in the / (root) filesystem.


mkdir /swapfile
dd if=/dev/zero of=/swapfile/swap00 bs=1048576 count=2000 #2 GiB
mkswap /swapfile/swap00
chown root:root /swapfile/swap00
chmod 0600 /swapfile/swap00
swapon /swapfile/swap00


If you want that to be a permanent part of the filesystem, you can add it
to your fstab to do so manually, though normally I'd recommend getting a
partition for this to be permanent:


echo '/swapfile/swap00 none swap sw 0 0' >> /etc/fstab


Finally, lacking swap does not hurt your system at all; it just means that
when you run out of RAM, you're out of memory, which is also the case if
you, with swap, run out of RAM and swap. The system will be fine, but
processes that need new "virtual memory", in either case of memory
exhaustion, will not get it, and will likely report as much when they
crash. Hopefully your host will let you know and restart them in that
case, though that's a bit of a manual process prior to systemd in newer
systems (SLES 12 and later. openSUSE 13.x and later, etc.).

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

http://superuser.com/questions/639618/linux-dont-create-swap-partition#639661

It always depends on who you talk to as to whether or not to swap

Visit my Website for links to Cool Solution articles.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Swap Partition in Sentinel Server

This link states that swap is required, which is simply not true for most
systems (the exception being those who lack sufficient RAM to boot, which
are by definition incorrectly configured). While a nice idea to have
sometimes, the only time swap is required is when you want to suspend to
disk (i.e. hibernate) which writes RAM to swap; outside of that case, swap
is not required.

Over the years I have seen the following reasons to have swap:

1. Hibernate - This is valid, but mostly for laptops/desktop, not
servers, and definitely not for a Sentinel box.

2. Writing nearly-never-used code out to free RAM - This is presumably
valid on any system, but this isn't going to be a huge chunk of code.
Either the code is used a lot, and having it on disk will hurt
performance, or it's nearly-never-used, and it's tiny by comparison (MBs,
not GBs). For a Sentinel service, doesn't matter.

3. Free up space for disk cache - This is now a tradeoff between
something on disk as swap, or something on disk as regular files. As a
result, it applies a bit to #2 (small), but otherwise going to disk for
something used a lot in RAM (now in swap) or something needed as data will
have the same performance hit, since both are on disk. If you want to
improve performance, add more RAM.

4. You just need it - This is mentioned in the link above, and it's
simply false.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

And then some tech details about how much to swap:

http://askubuntu.com/questions/103242/is-it-safe-to-turn-swap-off-permanently#103871

Visit my Website for links to Cool Solution articles.
0 Likes
abdullah921 Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server


Hi,

Thanks to both of you..
We don't have any unallocated space in the server..so that i will create
swap file using the filesystem..

But i have a few question:
1.If i have 160gb of RAM,how many gb that i should allocate for the swap
file?
2.Any affect if i create and attach the swapfile while sentinel is still
running? or i should stop the service

Thanks And Best Regards,
Abdullah


ScorpionSting;266952 Wrote:
> And then some tech details about how much to swap:
>
> http://tinyurl.com/zt38lyd
>
>
> --
> -"Also now available in 'G+'
> (http://plus.google.com/+BenWalter-Kiwi) and 'Website'
> (https://www.isam.kiwi/) format".- 😉
> ------------------------------------------------------------------------
> ScorpionSting's Profile:
> https://forums.novell.com/member.php?userid=1663
> View this thread: https://forums.novell.com/showthread.php?t=497873



--
abdullah92
------------------------------------------------------------------------
abdullah92's Profile: https://forums.netiq.com/member.php?userid=11344
View this thread: https://forums.netiq.com/showthread.php?t=55717

0 Likes
abdullah921 Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server


Hi,

Thanks to both of you..
We don't have any unallocated space in the server..so that i will create
swap file using the filesystem..

But i have a few question:
1.If i have 160gb of RAM,how many gb that i should allocate for the swap
file?
2.Any affect if i create and attach the swapfile while sentinel is still
running? or i should stop the service

Thanks And Best Regards,
Abdullah

ab;266935 Wrote:
> On 04/13/2016 07:34 PM, abdullah92 wrote:
> >
> > Hi All,
> >
> > It's normal when swap partition in sentinel server 0 MB?

>
> Normal to have no swap at all? Not really, but it's not really a
> problem
> either, that is unless you run out of RAM. If you do run out of RAM,
> or
> if you just want to use RAM for something else, swap can be used
> instead
> (virtual memory) but the the huge caveat that, being on disk, it is
> several orders of magnitude slower (both in terms of seek times and
> throughput) than real RAM.
>
> Since processes do not know what kind of "virtual memory" they are
> accessing most of the time (few people code that way these days)
> application performance, particular apps that use a lot of RAM as
> Sentinel
> can (Correlation, searching/reporting, etc.) will suffer to the point
> where you may be inclined to reboot the box to recover, which is a
> terrible "solution" to a symptom, not the root cause.
>
> I still usually setup swap on production systems as a just in case, but
> usually only a couple GiB so that there is some in a pinch. Once
> setup,
> it is seldom heavily used because that would either mean I had my
> swappiness set too liberally, or it would mean the system does not have
> enough RAM. vmstat provides good information on how much swap is being
> used actively (vs. just being used from time to time to hold things
> too-stale to bother with in RAM).
>
> >

Code:
--------------------
> >

> vmstat 1 100 #Will show stats 100 times, once per second
>

--------------------
> >

>
> You can also see current use of swap, and memory in general, on a
> system
> using the 'free' ('free -m' to see megabytes) command.
>
> You can either add a new disk (virtual or physical), carve out space
> from
> your current disk if you have room, or even add swap via a file in
> the
> filesystem (unless you're using BtrFS currently, which you are likely
> not
> since Sentinel does not support it).
>
> While you have those options, unless you are experiencing a problem
> right
> now, I'd just ignore it and maybe schedule expanding a disk (if
> virtual)
> or adding a tiny bit of space (LUN or virtual disk) during a
> maintenance
> window and then turn that new space into swap. Add it in via Yast's
> Partitioner tool. If you think you need it right now, add a swapfile
> to
> your current system and you can turn it on at any time after verifying
> you
> have enough space in a location to use up a couple of GiBs as shown
> below
> in the / (root) filesystem.
>
> >

Code:
--------------------
> >

> mkdir /swapfile
> dd if=/dev/zero of=/swapfile/swap00 bs=1048576 count=2000 #2 GiB
> mkswap /swapfile/swap00
> chown root:root /swapfile/swap00
> chmod 0600 /swapfile/swap00
> swapon /swapfile/swap00
>

--------------------
> >

>
> If you want that to be a permanent part of the filesystem, you can add
> it
> to your fstab to do so manually, though normally I'd recommend getting
> a
> partition for this to be permanent:
>
> >

Code:
--------------------
> >

> echo '/swapfile/swap00 none swap sw 0 0' >> /etc/fstab
>

--------------------
> >

>
> Finally, lacking swap does not hurt your system at all; it just means
> that
> when you run out of RAM, you're out of memory, which is also the case
> if
> you, with swap, run out of RAM and swap. The system will be fine,
> but
> processes that need new "virtual memory", in either case of memory
> exhaustion, will not get it, and will likely report as much when they
> crash. Hopefully your host will let you know and restart them in
> that
> case, though that's a bit of a manual process prior to systemd in
> newer
> systems (SLES 12 and later. openSUSE 13.x and later, etc.).
>
> --
> Good luck.
>
> If you find this post helpful and are logged into the web interface,
> show your appreciation and click on the star below...



--
abdullah92
------------------------------------------------------------------------
abdullah92's Profile: https://forums.netiq.com/member.php?userid=11344
View this thread: https://forums.netiq.com/showthread.php?t=55717

0 Likes
Knowledge Partner
Knowledge Partner

Re: Swap Partition in Sentinel Server

On 04/14/2016 11:23 PM, abdullah92 wrote:
>
> Hi,
>
> Thanks to both of you..
> We don't have any unallocated space in the server..so that i will create
> swap file using the filesystem..
>
> But i have a few question:
> 1.If i have 160gb of RAM,how many gb that i should allocate for the swap
> file?


The amount of RAM you have does not matter much anymore unless you plan to
suspend to disk, in which case you need as much swap as you have virtual
memory in use at the time you hibernate. For servers these days, I always
do 2 GiB and leave it at that. Most distros, including SLES, also seem to
default to 2 GiB. A million years ago there were recommendations to have
3x your RAM in swap, and that was mostly because people had RAM measured
in MiBs rather than GiBs, so it was actually possible to run out of real
RAM doing basic things.

> 2.Any affect if i create and attach the swapfile while sentinel is still
> running? or i should stop the service


No; you're not using it now, so you can add to your heart's content.
Removing is not always as easy, but turning off a device (partition or
file) for swap can also be done as long as its contents can safely be
removed (back into RAM).

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
ppeter1 Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

Default partition setup for Sentinel 7.4 appliances (ISO) is not creating swap at all. I wonder why this was changed
There is nothing about swap in current doc partition recommendations
https://www.netiq.com/documentation/sentinel-74/s74_install/data/b1557c4d.html
0 Likes
Knowledge Partner
Knowledge Partner

Re: Swap Partition in Sentinel Server

Perhaps because of the potential to double-swap data.

https://www.suse.com/documentation/sles11/book_sle_deployment/data/sec_yast2_i_y2_part_expert.html

Another way to look at this is: When running in a virtual machine, Linux
shouldn't have _any_ swap defined (or extremely little). There are
various reasons for this, but the one that I'm going to address is the
double-paging that happens when virtual machines swap out unused memory.

Since the host and virtual machine both use "least recently used" metrics
to decide what to swap out you will run into the situation where the host
has already written memory out to its swap area when the virtual machine
decides it wants to do the same thing. The guest references the memory to
write it out to swap, which means that the host has to bring that back
into memory first. You wind up doing 3 times the amount of I/O you would
otherwise if the guest had no swap defined, and probably 4 times when the
host once again decides that the unreferenced memory should be written out
to swap yet again.

In many cases it's better to give the virtual machine the amount of
virtual memory it needs to do its job than to constrain it artificially
and provide swap space. In the mainframe z/VM world, some customers give
the guests a small amount of swap space and then monitor it. If it starts
getting used they consider it time to review the virtual memory assigned
to the guest.

Just another perspective. The old 2.4 kernel thinking is also mentioned
in the documentation above, as are other cases to really have swap (namely
suspend-to-disk/hiberante).

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
ppeter1 Absent Member.
Absent Member.

Re: Swap Partition in Sentinel Server

ab;2426534 wrote:
In the mainframe z/VM world, some customers give
the guests a small amount of swap space and then monitor it. If it starts
getting used they consider it time to review the virtual memory assigned
to the guest.

I think, this is good reason to have small swap partition, question how small/big it should be for RCM or Sentinel server?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.