16183
![]() |
|
|
|
|
|||||||
| Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Has anyone tried using a ramdisk for optimized/faster compilation of ports? I added eight GB of RAM to this machine rather whimsically, (it's so cheap now), and am trying to come up with different ways of using it. I liked the idea of a ramdisk to speed up compilation, but I have no idea where to mount it.
Last edited by DutchDaemon; April 27th, 2012 at 01:32. |
|
#2
|
||||
|
||||
|
Mount it anywhere you like and set WRKDIRPREFIX. See ports(7) what it does.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
| The Following User Says Thank You to SirDice For This Useful Post: | ||
ring_zero (April 26th, 2012) | ||
|
#3
|
|||
|
|||
|
Mount it somewhere under /var, for example /var/ports/tmp and set the work directory for ports in /etc/make.conf like this:
Code:
WRKDIRPREFIX=/var/ports/tmp |
| The Following User Says Thank You to kpa For This Useful Post: | ||
ring_zero (April 26th, 2012) | ||
|
#4
|
|||
|
|||
|
Works rather well. Thanks.
|
|
#5
|
|||
|
|||
|
Sounds interesting, but I don't understand why with the above given path in /var the work directory is moved into RAM? What am I missing?
Last edited by DutchDaemon; June 15th, 2012 at 11:30. |
|
#6
|
||||
|
||||
|
/var/ports/tmp/ is the mountpoint where the RAM disk is mounted on. But it's just an example. You can mount it anywhere you like as long as WRKDIRPREFIX points to it.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#7
|
||||
|
||||
|
I'll give you one local example:
/etc/fstab Code:
tmpfs /staging tmpfs rw 0 0 Code:
WRKDIRPREFIX=/staging df -hCode:
tmpfs 9.9G 4.0k 9.9G 0% /staging ls -ld /staging Code:
drwxr-xr-x 3 root wheel 40 Jun 15 12:19 /staging $ find /staging -type dCode:
/staging /staging/usr /staging/usr/ports /staging/usr/ports/misc /staging/usr/ports/misc/unclutter /staging/usr/ports/misc/unclutter/work /staging/usr/ports/misc/unclutter/work/unclutter /staging/usr/ports/devel /staging/usr/ports/devel/imake /staging/usr/ports/devel/imake/work /staging/usr/ports/devel/imake/work/imake-1.0.4 /staging/usr/ports/devel/imake/work/imake-1.0.4/.deps /staging/usr/ports/devel/gccmakedep /staging/usr/ports/devel/gccmakedep/work /staging/usr/ports/devel/gccmakedep/work/gccmakedep-1.0.2 /staging/usr/ports/devel/makedepend /staging/usr/ports/devel/makedepend/work /staging/usr/ports/devel/makedepend/work/makedepend-1.0.3 /staging/usr/ports/devel/makedepend/work/makedepend-1.0.3/tests /staging/usr/ports/devel/makedepend/work/makedepend-1.0.3/tests/28045 /staging/usr/ports/devel/makedepend/work/makedepend-1.0.3/.deps /staging/usr/ports/x11 /staging/usr/ports/x11/xorg-cf-files /staging/usr/ports/x11/xorg-cf-files/work /staging/usr/ports/x11/xorg-cf-files/work/xorg-cf-files-1.0.4
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Administrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#8
|
||||
|
||||
|
Time a big port compile both from RAM and off disk. Reboot before each to clear filesystem cache. With buildworld, I found essentially zero difference putting /usr/obj in a tmpfs.
|
|
#9
|
||||
|
||||
|
I like my SSD's too much ;p)
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Administrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#10
|
||||
|
||||
|
That's an interesting point. Certainly those multiple builds of LibreOffice didn't do mine any good.
|
|
#11
|
||||
|
||||
|
In fact, all of my caches (browsers, etc.) are on a tmpfs as well.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Administrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#12
|
||||
|
||||
|
This is a somewhat tangential observation/question...
Running ZFS with 8GB (total) RAM, I note that even on heavy builds (world etc), the HD light only pulses very briefly and occasionally - e.g. one single short flash every few seconds. (I can't remember what it used to be like when I used to run UFS). So, assuming there's a decent caching infrastructure in place, like ZFS's L2ARC, is there something to be said for letting the system use memory as it sees fit? Is there much to be gained by manually specifying a RAM disc these days? sim
__________________
There's no place like ~ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ZFS Clone at RAMDISK is it possible? | stassik | Storage | 1 | January 31st, 2012 08:35 |
| [Solved] Compiling and installing a port as an unprivileged user | kpedersen | Installation and Maintenance of FreeBSD Ports or Packages | 4 | March 7th, 2011 17:56 |
| Compiling port issues | izaak86 | Installation and Maintenance of FreeBSD Ports or Packages | 0 | November 21st, 2010 06:23 |
| Cross compiling a port | olivier | Other Architectures | 0 | February 27th, 2010 18:05 |
| [Solved] Finding needed ports without compiling them, for a port | overmind | Installation and Maintenance of FreeBSD Ports or Packages | 3 | January 22nd, 2010 20:31 |