Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
upper limit for overcommitted tmpfs usage
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3652
Location: Hamburg

PostPosted: Sat Sep 19, 2015 1:26 pm    Post subject: upper limit for overcommitted tmpfs usage Reply with quote

At my tinderbox I do have 16 GB RAM at all. I do mount at every of 6 running chroot images a 9 GB tmpfs onto /var/tmp/portage. I'd like to limit the total amount of really used tmpfs space to 14 GB.

How can I achieve that ?
Update
I use tmpfs :
Code:
$ df -h
...
/dev/mapper/vg1-lv1  4.9T   40G  4.7T   1% /home/tinderbox/images
tmpfs                9.0G  1.1G  8.0G  12% /home/tinderbox/images/amd64-13.0-stable_20150919-173521/var/tmp/portage
tmpfs                9.0G   74M  9.0G   1% /home/tinderbox/images/amd64-desktop-unstable_20150918-212348/var/tmp/portage
tmpfs                9.0G  320M  8.7G   4% /home/tinderbox/images/amd64-gnome-unstable_20150918-212335/var/tmp/portage
tmpfs                9.0G   40K  9.0G   1% /home/tinderbox/images/amd64-kde-unstable_20150918-212343/var/tmp/portage
tmpfs                9.0G  204M  8.9G   3% /home/tinderbox/images/amd64-hardened-unstable_20150918-212345/var/tmp/portage
tmpfs                9.0G  1.7G  7.4G  19% /home/tinderbox/images/amd64-hardened-unstable_20150918-212347/var/tmp/portage
tmpfs                9.0G   23M  9.0G   1% /home/tinderbox/images/amd64-13.0-unstable_20150918-205950/var/tmp/portage
so the idea is to limit the sum of all 7 to not be above 14 GB.
/Update


Last edited by toralf on Sat Sep 19, 2015 8:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1729

PostPosted: Sat Sep 19, 2015 8:21 pm    Post subject: Reply with quote

https://wiki.archlinux.org/index.php/Cgroups looks like a good bunch of hints.
Create a cgroup, limit RAM for it and run all those chroots with that cgroup.

Or, alternatively, let all those images use shared tmpfs. Portage creates locks so it should resolve conflicts on it's own.
Running multiple images you might also consider building binary packages
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum