vmtouch icon indicating copy to clipboard operation
vmtouch copied to clipboard

file locking seems to not work

Open arch-user-france1 opened this issue 4 years ago • 10 comments

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)

arch-user-france1 avatar Oct 03 '21 16:10 arch-user-france1

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

MichaIng avatar Oct 03 '21 16:10 MichaIng

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.)

arch-user-france1 avatar Oct 03 '21 16:10 arch-user-france1

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.

MichaIng avatar Oct 03 '21 16:10 MichaIng

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 avatar Oct 03 '21 16:10 arch-user-france1

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)

arch-user-france1 avatar Oct 03 '21 16:10 arch-user-france1

Ah it has a verbose flag:

vmtouch -vl ./

MichaIng avatar Oct 03 '21 16:10 MichaIng

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.

hoytech avatar Oct 04 '21 18:10 hoytech

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 avatar Oct 05 '21 16:10 arch-user-france1

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 avatar Oct 05 '21 16:10 arch-user-france1

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

arch-user-france1 avatar Nov 10 '21 11:11 arch-user-france1