Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73836 - enable portage to get and write down the max size of used memory when emerging some package
Summary: enable portage to get and write down the max size of used memory when emergi...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-08 13:14 UTC by Rumen Yotov
Modified: 2004-12-09 03:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rumen Yotov 2004-12-08 13:14:55 UTC
Hi,
In the last days tried/experimented with tmpfs to speed up the compilation process.
Sad thing is that before doing this i don't know/estimate the approximate amount of memory the ebuild/package needs, so i could allocate the size plus some amount (10%) just in case. Or if i already have allocated some (ex. 256 MB) just check if it's enough for a specific ebuild and then use it or not.
Think IMO this could be done easily, just before qmerge stage get the size of current work directory plus image/sandbox-dir and write it down somewhere.
Still don't know/have idea/ where to write this additional info, portage dababase maybe.
If present this info could later be fetched by a tool (for example using genlop or other tool, in best case by portage) and people could even manually (initially), see how much memory (approximately as this depends on used USE-flags, version, etc) they need.
Or in a perfect case automagically check and mount/unmount tmpfs with a size les s that of some previously given (by user) maximum.
In my tests i've seen nearly 50% less time using tmpfs, if there is enough memory of course ;)
Thanks
Rumen

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2004-12-08 15:59:46 UTC
CFLAGS and USE could have a huge impact on that value
Comment 2 Rumen Yotov 2004-12-08 18:02:00 UTC
Hi,
Of course it greatly depends, but this info will be user-config-specific (if i don't change my CFLAGS,USE-flags too much). Will use previous version's value.
In a slowly changing config the value will be near the truth.
Have also see some problem with new packages which are much bigger than previous so that mem-size value may be uncorrect.
May be use one more ;-) global USE-flag: 'use-tmpfs' and load it in fstab on boot.
Rumen
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2004-12-09 03:06:01 UTC
This won't be done by us. The next major release of portage will support a plugin system to some degree that should be capable of supporting this externally.