• 1 Post
  • 1.31K Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle


  • The “multiple distros thing” is often the most confusing aspect of the Linux ecosystem. But don’t sweat it too much - they’re more similar than different. Generally speaking you can do all the same things with most any distro.

    The most user-facing differences are in the installer, default UI settings, and how applications are installed. A lot of it is simply preference.

    All of the ones you mentioned are “fine”.

    But if you want to “distro hop” (something that I consider to be a mostly pointless activity) then you need a way to preserve your home directory between installs. It’s where all of your settings are kept. The two ways of doing that are typically a) have a backup somewhere (recommended regardless) and b) put /home on a separate disk partition (more advanced - easily Googleable though).


  • To create an invite you:

    # drop into mongo shell
    docker compose exec database mongosh
    
    # create the invite
    use revolt
    db.invites.insertOne({ _id: "enter_an_invite_code_here" })
    

    That’s pretty jank.

    Also - I’m getting pretty fed-up with self-hosting documentation that assumes very specific environments and goes into detailed configuration for that environment. Don’t tell me how to setup a server and how to enable/configure SSH and setup UFW as part of setting up your software. Just tell me how to setup your software and what ports it uses.







  • Yeah - I’ve even seen people recommend switching distros just because another has a different default DE without understanding that most distros let you install multiple DEs…

    The differences between distros aren’t as big as people make them out to be*. Mostly just installer, how packages are managed, what versions of packages you get, etc.

    • Unless you’re on an “immutable” distro in which case - yeah - shit is different.








  • …it answers from the attached KBs only. If the fact isn’t there, it tells you - explicitly - instead of winging it.

    So you’ve made a FAQ with a LLM interface? I could see that potentially being useful for cooperate “let our bot answer your questions” tools.

    But the usefulness of AI isn’t just in “tell me a fact”. Like what would your AI give for "what functions would I use in Python to convert a utf16 string to utf8? Would the answer need to be in the KB already?



  • What are IO and Iotop?

    Input / Output.

    Reading and writing to disk, network, etc.

    iotop shows will show applications writing and reading from disk. It’s going to likely be pretty sporadic.

    What may be happening, and what others are suggesting, is that you’re running out of memory (8gig isn’t that much these days). When that happens the system starts writing memory to disk so it can free more. That’s what you see with the “swap” usage. You can see a bit more about your memory usage with free -m:

    $ free -m
                   total        used        free      shared  buff/cache   available
    Mem:           64141       17077       24020        1981       30419       47063
    Swap:          20479           0       20479
    

    Using swap space isn’t necessarily bad. But reading/writing to it frequently can be a performance killer. You can monitor that with a command called vmstat:

    $ vmstat -w 3
    --procs-- -----------------------memory---------------------- ---swap-- -----io---- -system-- ----------cpu----------
       r    b         swpd         free         buff        cache   si   so    bi    bo   in   cs  us  sy  id  wa  st  gu
       1    0            0     24590136        70748     31066604    0    0   228   309 9959   18   8   1  91   0   0   0
       0    0            0     24595172        70748     31065076    0    0     0   119 3159 6677   2   1  98   0   0   0
       2    0            0     24607436        70748     31070316    0    0  2300    75 3147 6693   2   1  97   0   0   0
       0    0            0     24594892        70748     31070316    0    0     0   584 3417 5950   1   1  98   0   0   0
    

    The columns to pay attention to there are under the ---swap-- header. si is “Swap In” and so is "Swap Out. Those are reads/writes to and from swap space. Seeing a little activity there is fine. It is typically pretty spikey. But if you’re seeing lots of numbers there then it could just indicate that you’re running low on memory and the OS needs to move things to and from disk frequently. While it’s moving things to and from the disk the application trying to use that memory has to wait.