Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo tmpfs on GPU Ram disk?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Tue Feb 02, 2021 5:12 am    Post subject: Gentoo tmpfs on GPU Ram disk? Reply with quote

Could one setup distc with portage's directory on a gpu ramdisk for extremely fast builds? Has anyone done it before?
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 874

PostPosted: Tue Feb 02, 2021 10:01 am    Post subject: Reply with quote

it can certainly be done: mount the tmpfs and set portage_tmpdir (look up the exact variable name in make.conf) to that.
i wouldn't expect
Quote:
extremely fast builds
though because on systems accessible to us mere mortals usually disk-io or, in this case, ram-speed isn't the limiting factor when compiling but cpu power. i ususally keep portage_tmpdir in ram and i cannot say there is a noticeable speed increase when building. just give it a try!
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54644
Location: 56N 3W

PostPosted: Tue Feb 02, 2021 12:07 pm    Post subject: Reply with quote

DawgG,

There isn't a speed improvement for the portage build space in RAM.
When you have the RAM for it. the kernel virtual memory system keeps the build products in the disk cache. They are never flushed as there is no demand on RAM.
You just get a lot of writes to disk that are never read. Putting the portage build space in RAM saves these writes. That's a good thing on SSD.
It saves bus bandwidth but thats not a speed improvement that you would notice.

As to using the RAM on a GPU, it will be slower than main memory because the interface is not designed to access filesystems.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 874

PostPosted: Tue Feb 02, 2021 1:16 pm    Post subject: Reply with quote

NeddySeagoon,
you are right - THX for the info.
one other main reason for doing this is that it "cleans" the build-dir on every remount/reboot.
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Feb 02, 2021 3:40 pm    Post subject: Reply with quote

A PCIe 4.0 x16 card will give you a maximum of 31GB/s bandwidth. Dual-channel DDR4 at its slowest rated speed is faster than that. Same goes for PCIe/DDR 3 and most of DDR 2 as well.

You won't get extremely fast builds, you'll get extremely hot builds.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Tue Feb 02, 2021 7:11 pm    Post subject: Reply with quote

Now I know.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3796
Location: Rasi, Finland

PostPosted: Tue Feb 02, 2021 7:37 pm    Post subject: Reply with quote

Fun fact: there was a driver that made possible to use GPU ram as swap. It could be useful on some laptops with dedicated gpu.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Tue Feb 02, 2021 9:05 pm    Post subject: Reply with quote

Zucca wrote:
Fun fact: there was a driver that made possible to use GPU ram as swap. It could be useful on some laptops with dedicated gpu.


Neat-o. 8)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20539

PostPosted: Tue Feb 02, 2021 9:12 pm    Post subject: Reply with quote

Zucca wrote:
Fun fact: there was a driver that made possible to use GPU ram as swap. It could be useful on some laptops with dedicated gpu.
Also to not use system RAM and still preserve solid-state devices.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Wed Feb 03, 2021 12:20 pm    Post subject: Reply with quote

Hi, I understand why the GPU ramdisk is not such a good idea, but the geek in me is asking: HOW exactly is that done?
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Wed Feb 03, 2021 7:43 pm    Post subject: Reply with quote

nick_gentoo wrote:
Hi, I understand why the GPU ramdisk is not such a good idea, but the geek in me is asking: HOW exactly is that done?


https://www.youtube.com/watch?v=sdlerQmeZds
https://www.reddit.com/r/pcmasterrace/comments/5fg48k/gpu_ram_drive_create_ram_disk_with_gpu_vram/
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3796
Location: Rasi, Finland

PostPosted: Wed Feb 03, 2021 8:02 pm    Post subject: Reply with quote

https://github.com/Overv/vramfs
Oh this is fun. :P
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Thu Feb 04, 2021 9:49 am    Post subject: Reply with quote

Thank you for the pointers!
Zucca wrote:
Oh this is fun. :P

Yes, indeed
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3796
Location: Rasi, Finland

PostPosted: Thu Feb 04, 2021 10:29 am    Post subject: Reply with quote

Now... Do I spare on RAM next time and invest in a pro GPU that has lots of vRAM? 8)

Joking.

A little off-topic, but I have been looking at those WAM (Write acceleration module) cards as a faster swap device. Still buying more RAM makes more sense, obviously. But a PCIe card filled with cheap DDR3 memory is an interesting concept.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures 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