57,650 karma · joined Jun 16, 2015 (11y ago) · 19,241 submissions
news.ycombinator.com##tr.athing.comtr:has(a.hnuser):has-text(/\bLinuxBender\b/)
For HN usage questions see https://github.com/minimaxir/hacker-news-undocumented for HN tips (not my repo) (\_/)
(='.'=)
(")_(")comment 8y ago · link · parent
It appears the first PCID code was merged in 4.14.12 so you will probably have that in the coming days / weeks. CoreOS is also 4.14.11.
For those on LTS releases, we may have to venture into uncharted waters. The first that came to mind was elrepo.org, as they apply some of the same build options that Redhat uses against the latest upstream. Their kernel packages are meant to provide support for newer laptop hardware...
comment 8y ago · link · parent
It looks like Ubuntu 18 Bionic Beaver may have it. (4.15) I suppose some folks use Ubuntu in a datacenter, but more likely the LTS releases and 18 is not likely in many production datacenters.
Can you confirm that Redhat backported that newer PCID code into the 3.10 kernel branch? If so, people should not be seeing a performance hit on the KPTI patch.
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
And if you must use it, then at least know when you need to encrypt your swap. If you have customer data in memory that is encrypted at rest, then you must encrypt your swap.
Some people use crypttab for this, but I think that is a mistake. Rather, people should have a swap volume or partition that on each system boot, you use cryptsetup with a long randomly generated password and mkswap -f, then swapon each time.
Most companies have policies about encrypting customer data. If you have swap, it plays into that policy.
comment 8y ago · link · parent
From a technical perspective, one could implement blocking on their own network to make it harder (no pun intended) to find. pfSense might be helpful. There are browser addons to block porn.
If porn is causing problems in your life, such as interfering in your relationship or your ability to focus on work, then perhaps consider seeing a counselor.
comment 8y ago · link · parent
Either way, what most folks are actually missing is the correct kernel settings for the amount of memory they have. Sadly, the kernel does not dynamically adjust these based on your total amount of memory. Below is based loosely on Redhat suggestions. Please note, that if you fall below the min free, the kernel will decide what to do next, based on your oom and panic settings. The settings below will have the kernel free cache and other memory earlier so that you do not hit those stalling conditions and can even prevent some OOM race conditions. Some might suggest tuned, but use tuned with caution or at least read up on everything it does.
MEM=`grep ^MemTotal /proc/meminfo | awk {'print $2'}`
if [ ${MEM} -gt 1129241478 ] ; then
sysctl -q -w vm.min_free_kbytes=16384000
elif [ ${MEM} -gt 564620739 ] ; then
sysctl -q -w vm.min_free_kbytes=8192000
elif [ ${MEM} -gt 352887962 ] ; then
sysctl -q -w vm.min_free_kbytes=4096000
elif [ ${MEM} -gt 176443981 ] ; then
sysctl -q -w vm.min_free_kbytes=1024000
elif [ ${MEM} -gt 88221990 ] ; then
sysctl -q -w vm.min_free_kbytes=524288
else
sysctl -q -w vm.min_free_kbytes=262144
fi
If you have small VM's, then perhaps set the default above to something a little smaller. You can of course free up about 128MB on default installations by removing "crashkernel" from your grub config and rebooting.Then do this regardless, because overcommit set to 0 does not mean off, so we set the ration to 0 as well. Overcommit is good for developers testing code and finding the correct ways to manage memory in their applications during development.
sysctl -q -w vm.overcommit_ratio=0
And of course, cache pressure plays into early evacuation of the right cache based on your usage: ## default is 100 (optimal for file servers). 4000+ for in memory databases.
## 10000 means always prefer page cache.
sysctl -q -w vm.vfs_cache_pressure=1000
And if you have people oversubscribing a lot: (adjust based on your memory capacity) sysctl -q -w vm.admin_reserve_kbytes=131072
sysctl -q -w vm.user_reserve_kbytes=262144
Please do read up on all of these before testing on your test machines. [1][1] https://www.kernel.org/doc/Documentation/sysctl/
Then finally, make sure you have Transparent Huge Pages disabled unless you know for sure you need it. THP can leak a lot of memory and it is nearly impossible to see without extensive kernel debugging.
In grub, set this and reboot:
transparent_hugepage=madvise
Or to manually disable THP during run-time, echo -n "madvise" > /sys/kernel/mm/transparent_hugepage/enabled
echo -n "never" > /sys/kernel/mm/transparent_hugepage/defrag
Then restart your applications. THP defrag can also cause stalling and lag spikes, especially in large memory java deployments (it will look like FGC's) and in MongoDB, Cassandra, others.If you did this manually, stop your apps, flush cache, compact memory, then start your apps.
sync;sync;sync
echo 3 > /proc/sys/vm/drop_caches
echo 1 > /proc/sys/vm/compact_memory
Some will say 3 sync's is not required. This is mostly true, but some old raid controllers treat this differently.comment 8y ago · link · parent
comment 8y ago · link · parent
Some custom built homes intentionally have multiple windows that are too slim for a human to fit through for this reason.
[ Special Note: ] If you decide to do this, ensure you build other methods of escape for fire hazards.
comment 8y ago · link · parent
Now they can be in your neighborhood, using a list of popped accounts to unlock a batch of houses. They can look at your Amazon connected camera to know when you have left your home or children unattended. Amazon accounts get popped all the time.
Amazon is also a great place to get GB/TB of customer data from public S3 buckets.
18868.
Android security alert: Google's latest bulletin warns of 47 bugs, 10 critical(zdnet.com ↗)
5 points · by LinuxBender · 8y ago · discuss
18869.
You're not being paranoid. UK.gov really is watching you(theregister.co.uk ↗)
3 points · by LinuxBender · 8y ago · discuss