Stream: helpdesk (published)

Topic: memory info


view this post on Zulip Richard Reeve (Aug 08 2021 at 23:35):

Is there any way of finding out how much RAM my computer has from inside Julia? It would also be useful to be able to find out how many physical / virtual cores it has and what the speed of the processor(s) is, but the main thing I need to know is the RAM... thanks!

view this post on Zulip Mosè Giordano (Aug 08 2021 at 23:44):

julia> Sys.total_memory()
0x00000003e0b0c000

julia> Sys.free_memory()
0x000000023ede0000

view this post on Zulip Mosè Giordano (Aug 08 2021 at 23:46):

number of threads is in Sys.CPU_THREADS, number of physical cores isn't accessible at the moment in Julia Base, but there are probably third-party packages that can provide that information

view this post on Zulip Richard Reeve (Aug 09 2021 at 00:16):

Thanks, that's great - I knew it must be in there somewhere!

view this post on Zulip chriselrod (Aug 09 2021 at 01:22):

but there are probably third-party packages that can provide that information

I recommend Hwloc.jl


Last updated: Nov 06 2024 at 04:40 UTC