exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 172 discussion

Actual exam question from CompTIA's XK0-005
Question #: 172
Topic #: 1
[All XK0-005 Questions]

As part of the requirements for installing a new application, the swappiness parameter needs to be changed to 0. This change needs to persist across reboots and be applied immediately. A Linux systems administrator is performing this change. Which of the following steps should the administrator complete to accomplish this task?

  • A. echo "vm.swappiness=0" >> /etc/sysctl.conf && sysctl -p
  • B. echo "vm.swappiness=0" >> /proc/meminfo && sysctl -a
  • C. sysctl -v >> /proc/meminfo && echo "vm.swapiness=0"
  • D. sysctl -h "vm.swapiness=0" && echo /etc/vmswapiness
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Damon54
10 months, 2 weeks ago
Selected Answer: A
To persist the parameter value indefinitely -- that is, until the user wants to change it again – they must manually update the sysctl.conf file. The command calls the nano text editor, which lets the user edit the file directly in the terminal. When the file opens, the user scrolls to the end of the text and adds the following setting. "vm.swappiness=0" >> append /etc/sysctl.conf && sysctl -p sysctl -p ( ( allows you to load the settings from a configuration file )
upvoted 2 times
...
Damon54
10 months, 2 weeks ago
Linux swappiness is a kernel parameter that determines how aggressively the Linux virtual machine (VM) swaps pages between memory and the swap space on the system's disk. Users can fine-tune the rate at which a Linux kernel can move pages into and out of active memory using the swappable parameter, which can be set between 0 and 200. The higher the number, the more aggressively the VM swaps data to disk. By default, the swappiness value on most Linux computers is set to 60. The user can change this level to a different setting either temporarily or indefinitely. Some database servers managed cache to use RAM, and is capable of managing what should be in RAM and what shouldn’t be. Allowing the Linux operating system to have too much control over what memory pages are in RAM is likely to lower your database performance. Therefore, it is recommended that swappiness should be set to 0.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...