Skip to content

u/MG2R

In this archive from Nov 2015 to Jul 2021

7
posts
123
comments
0
media
696
score

Do NOT use a swapfile if you don’t have to. Swapfiles are messy, have less performance and in the last bug in rc1 it was mentioned by Linus itself that they are only a thing because he doesn’t want to break userspace.

If you have the option, opt for a partition instead of a file.

-2 points

This isn’t a question of what can you pass but a question of what do you need. A bare, bone stock Windows 10 install needs 2 GB to just run and maybe open paint. If your application will consume 20 GB of RAM, you’ll need 22 GB of RAM for the VM running Windows.

Looking at the RAM split you have there, it makes me wonder which machine you’ll be doing your development on. I imagine there’s one VM that’ll be used to develop and the other just to test run it. If that’s correct, I also assume you’ll have a browser with quite some tabs open in your main dev VM that’ll need quite some RAM too.

The cool thing is that you can always add more RAM if you need it

1 points

CPU gets shared among VMs. RAM does not. If you need 8 GB for Windows, 4GB for Mac and another 6GB for Mint, you’ll need more than 18GB of RAM of you want to run everything at the same time

Depending on what you’re going to use your guests for, you might need more graphics horsepower than what libvirt/QEMU emulation provides by default. If your motherboard supports it, you can get a dedicated graphics card for each VM and pass them through. Alternatively, you can use actual hardware virtualization with Intel integrated graphics to get to a nearly-native performance level. The arch wiki has a good article on it

1 points

The problem is also that not everyone’s brain works the same way. The mental capacity to visualise an abstract maths problem is not something everybody has. Similarly, the mental capacity to quickly remember and correctly apply grammatical rules for a specific language is not something everyone has.

7 points

Programming is hard for the same reason math is hard or chemistry is hard or physics is hard or learning a new language is hard: it requires an amount of mental effort. More specifically, it requires insight into abstract concepts and a form of mental visualising not everyone is capable of or good at.

15 points

Have you read the explanation at the upstream code repository? https://github.com/vianney/arch-luks-suspend

When you suspend your machine, your Desktop Environment (e.g. Gnome, KDE, etc...) locks your machine so you need a password to unlock it again.

However, what it doesn’t do is wipe the encryption key for encrypted partitions out of memory. This means an attacker can potentially steal your machine, freeze the memory while suspended and read the key off of it with advanced equipment.

If you want to not run this risk, you can use cryptsetup luksSuspend on any Luks partition before signing off. However, doing that for the root device requires some extra precautions, which is exactly where the script you linked comes in

Edit: I have never seen or used what you linked. I just read the readme now. Do not take my explanation as some sort of approval or condoning.

2 points

Why are those specific machines on the list? Is it simple availability?

What’s your use case? What are the requirements in terms of specs/workload? What budget do you have?

Why are you switching machines in the first place, what’s bothering you about the current one?

1 points

I use btrfs with subvolumes. It allows me to keep things separate and have different FS settings in specific parts of the tree while not having to put a rather inflexible quota on any part of the tree.

2 points

Alright.

First off, 64-bit: OP has more than 4GB of RAM. 32-bit makes no sense. Thus, this point is moot, as it would go for any distro.

Second, the compiler flags. Do you know other main distros that do better in this regard? At what cost? Everything is a compromise. Also, I would be interested in seeing how much RAM this would actually save. I don't think it would be very significant.

Third, glibc. AFAIK, and I could be wrong here, glibc is the de-facto standard for c libraries. Is there any other main distro that doesn't use this by default?

I'm still not convinced that running the same set of software on a different mainstream distro would result in significant RAM savings. I'm convinced the main differentiator for RAM usage in this scenario would be using alternatives for the main memory hogs in the screen. For example: netctl intead of NetworkManager and rsyslog instead of journald. You'd lose a lot on functionality though, IMO. All this to say: I don't think this has anything to do with Arch, and everything to do with the software said OP decided to run. Hence, my original comment.

1 points

Arch is just a kernel and a bunch of as-close-to-upstream-as-possible compiled packages. You need it to consume less RAM? Install/run less memory-hungry programs.

Unless I'm missing something obvious with what it means for a distro to be "optimized for RAM", how else are you going to make a linux distro running the exact same applications as this run with less RAM? You could reduce the allotted memory for journald, thereby making it keep a smaller set of logs in its journal. Other than that, what could Arch as a distro maintainer do to lower the memory usage of a setup like this?

0 points

Also, I don't understand why you ....

In general, this is answered with "because legacy". Chef is one of those things we're trying to replace ASAP, so we also don't want to put in any more time than we have to :)

Thanks for the feedback!

Still interested in how you use containers, though. From your original comment, I understood you use containers for almost all of the binaries you use on your machine, thus making -Syu pretty much safe to run anytime. However from this comment, it sounds like I completely misunderstood what you were saying.

1 points

In general I agree, exactly because working with them is such a hassle, as I described. However, for my specific use case of chefdk, it is the best option, as I'm forced to use a very old chef version and chef is a ruby dependency nightmare. I don't want to mess with that setup more than once in my life. Given that my company requires the use of MacOS, I'm also forced to re-do my entire installation every year-or-so because Macbooks and MacOS are pieces of utter junk.

So for chef, it really seemed like the best option. If /u/Ny432 has a better way to manage containerized applications, that would be stellar.

2 points

Practical question around using containers for almost anything: how do you map commands to the full container command? Actual example: at work I want to run chef exec knife environment from file <file> and I want the executables for that to be containerized.

Currently, my solution is to use the chefdk container from docker hub and with a Dockerfile add some custom gems. Then, I launch the container via this alias in my bashrc:

alias chef='docker run --rm -it -v $PWD:/code -v $HOME:/root <mychefcontainer>:latest chef'

I map $PWD to /code so it can access my recipes/environment files and I map $HOME to /root so the container can use my SSH keys for the upload of files to manage.chef.io.

However, maintaining those aliases for every application I want to run like this would get tedious if I had a lot of apps I wanted to run like this. Is there a better way of managing that?

1 points

Not on all systems and not on all encryption ciphers. Even then, if your cpu has an AES arithmetic unit built-in, and you are using a compatible cipher, and you CPU drivers will use the specific arithmetic unit to do the calculations, it will still come with a non-zero overhead. Work does not come free. Ever.

That said, SSD encryption also does not come free

7 points

First try to get regular SSH logins work, the components involved are:

  • A public/private key pair: used for authentication
  • A file with authorized public keys which can be used to log in

The way it works is that on the machine you're trying to log in to, there's a file under /home/user/.ssh called "authorized keys". Each line in that file is an entry for an authorized public key. If the public key for the key pair you're trying to use is not present in this file, access will be denied.

You can either copy the public key manually into the file, or use ssh-copy-id to do it for you.

If it still doesn't work, verify the permissions. The .ssh directory should be 0700. Your private key (usually called id_rsa) should be 0600. Your public key (id_rsa.pub) should be 0644. The authorized_keys file needs to be 0600 on the remote server.

Side note: for backup-over-ssh solutions, you might want to have a look at borg

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.