• 11 Posts
  • 213 Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle





  • Linux has kind of two forms of memory pages (entries in RAM), one is a file cache (page cache) and the other is “memory allocated by programs for work” (anonymous pages).

    When you look at memory consumed by a process you are looking at RSS, page/file cache is part of kernel and for example in btop corresponds to Cached.

    Page cache can never be moved into swap - that would be the same as duplicating the file from one place on a disk to another place on a (possibly different) disk.
    If more memory is needed, page cache is evicted (written back into the respective file, if changed). Only anonymous pages (not backed by anything permanent) can be moved into swap.

    So what does “PostgreSQL heavily relies on the OSs disk cache” mean? The more free memory there is, the more files can be kept cached in RAM and the faster postgres can then retrieve these files.

    When you add zram, you dedicate part of actual RAM to a compressed swap device which, as I said above, will never contain page cache.
    In theory this still increases the total available memory but in reality that is only true if you configure the kernel to aggressively “swap” anonymous pages into the zram backed swap.

    Notes: I tried to simplify this a bit so it might not be exact, also if you look at a process, the memory consumed by it is called RSS and it contains multiple different things not just memory directly allocated by the code of the program.


  • Had to solve the same problem few months ago, user provided content and so, user provided translations.
    We use postgres everywhere and we had to support 3 languages initially with one more eventually, so we decied to use json fields for anything that could be translated (which wasn’t too much). Mind you, this was basically a (temporarily permanent) prototype project but (fresh) postgres has a good support and operators for json so it worked alright.

    EDIT: I remembered that hstore might be a good alternative too, I think it was slightly less “heavy” and had better operators for the kind of access we needed






  • Best bet would be that something reloaded/changed the underlying ip/nftables bypassing ufw (ufw is just a frontend, I do not know if it periodically verifies the current rules are correct and it would feel extraneous to me if it did). Or it didn’t apply it correctly.

    You can get the actual rules with iptables-save (dunno about respective nftables command)


  • If your primary usecase is going to be music (so a need for realtime capabilities for stuff like recording, VSTs and DAWs) then I do not reccomend immutable distros for a simple reason: you will probably/eventually need to hack something up to get it to work and at that moment, the immutability is just extra work.

    As far as I have tried fiddling with the music stack on Linux (which is not that much), the whole pipewire/JACK/carla stack is a bit messy and I can’t imagine it working with flatpacks due to the sandboxing/permissions.







  • taaz@biglemmowski.wintoLinux@lemmy.mllatest stats for fedora atomic spins
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    1
    ·
    edit-2
    8 months ago

    Friend just hopped to Bazzite from Windows.
    I was hoping the atomocity would be a great boon - you kind of can’t break it right.

    Well, he wanted to configure RGB lighting on his mouse but the flatpak openrgb did not work, supposedly the udev rules included in bazzite by default, are not up to date or there was some other problem.
    As such we had to install openrgb the usual system-wide way, with rpm-ostree in terminal - something I was hoping he would never had to do.


  • Unless the vendor is rolling something super custom, for the communication TO the keyboard, it should use USB HID.

    Start Wireshark, filter for hid, connect the KB and the first message should be a HID descriptor of the KB, look for Output Reports (it’s meant from the POV of the usb master) or Feature Reports.
    Though, this will probably not yield much insight - vendors love to do the easy thing, reserve opaque 32x8 bytes as a “downlink” Output communication in the Vendor Usage Page and stuff their own protocol/encoding in there.

    On linux I can recommend hid-tools for working with this, in windows I believe your only solution is Wireshark.

    https://www.marcusfolkesson.se/blog/hid-report-descriptors/

    Happy Hacking!

    E: About the already reversed software, for logitech (and more) stuff, there is piper but you will want to look into the underlying daemon libratbag, there is also solaar