hoytech / vmtouch

Portable file system cache diagnostics and control
https://hoytech.com/vmtouch/
BSD 3-Clause "New" or "Revised" License
1.79k stars 210 forks source link

file locking seems to not work #93

Open arch-user-france1 opened 2 years ago

arch-user-france1 commented 2 years ago

If I use for exmp. vmtouch -dlw <mount-path of /dev/sr*> it reads all from the drive but if I let totem play the music files it has (and the vmtouch process didn't lock all) it's just poor performance - it tries to read all again and the vmtouch process still tries to read so it just stutters. Also it basically seems to not help much (I feel like it's re-reading the files even they are already locked by vmtouch)

MichaIng commented 2 years ago

Try to not lock the drive device but the mount point instead.

arch-user-france1 commented 2 years ago

uh yeh I did that I edited the post

Happens with every Ubuntu 21.04 at home

Just feels like - yes, it's reading the files but they can easily disappear (like you read the files with cat, wc, nano etc.)

MichaIng commented 2 years ago

Hmm, it works fine here via vmtouch -l /path/to/dir to lock the whole directory content. Probably running it in foreground shows some meaningful output about what happens? My binary has been manually compiled from sources, but I cannot imagine that there is any relevant difference with the version shipped by Ubuntu, considering last release and the limited build options.

arch-user-france1 commented 2 years ago

just no output (I don't wait until it is done I hear the cd reading the content. I tried to play the .wav but the player got stuck trying to read something from the cd reader (wich was overloaded and couldn't get data for both processes fast enough)


france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$ vmtouch -l ./
^C
france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$ ^C
france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$ ^C
france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$ 
arch-user-france1 commented 2 years ago

france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$ uname -a Linux Ubuntu-Desktop 5.11.0-37-generic #41-Ubuntu SMP Mon Sep 20 16:39:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux france1@Ubuntu-Desktop:/run/user/1000/gvfs/cdda:host=sr0$

(also on xanmod kernels - just not reading from cache)

MichaIng commented 2 years ago

Ah it has a verbose flag:

vmtouch -vl ./
hoytech commented 2 years ago

Most systems have pretty strict resource limits on the amount of memory locked, maybe it is hitting those? You could try increasing this (ie ulimit -l) or running as root.

arch-user-france1 commented 2 years ago

Most systems have pretty strict resource limits on the amount of memory locked, maybe it is hitting those? You could try increasing this (ie ulimit -l) or running as root.

No, if it would hit, then there's an error message

arch-user-france1 commented 2 years ago

Ah it has a verbose flag:

vmtouch -vl ./

No errors......

The program seems to work without any error but the operating system wants to read the stuff again instead of using that in RAM Could that happen? Is this possible and avoidable?

arch-user-france1 commented 2 years ago

wait... Maybe it's just triggering the device but the data is in cache? And maybe it doesn't work with CDs