Memory usage

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory usage

Awsaf Rahman
Hello all,

I want to profile a few Erlang programs I wrote. Basically, I want to find out the following: 
1) CPU and memory usage during compilation
2) CPU and memory usage during execution

Is there anyway I can do this? 

Kind regards
Awsaf

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Memory usage

Paul Peregud-2
To profile CPU time, you can use fprof (part of OTP distribution).

Why would you want to profile CPU usage during compilation? Are you planning working on Erlang compilator (erlc)?

On Sun, Sep 23, 2018 at 12:12 AM Awsaf Rahman <[hidden email]> wrote:
Hello all,

I want to profile a few Erlang programs I wrote. Basically, I want to find out the following: 
1) CPU and memory usage during compilation
2) CPU and memory usage during execution

Is there anyway I can do this? 

Kind regards
Awsaf
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


--
Best regards,
Paul Peregud
+48602112091

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Memory usage

Awsaf Rahman
I am trying to compare Erlang and Haskell based on compile time, execution time, memory usage and cpu usage for a set of 10 programs. I am not fluent in either of them and this is my first time trying benchmarking. 

On Sun, Sep 23, 2018 at 8:05 PM Paul Peregud <[hidden email]> wrote:
To profile CPU time, you can use fprof (part of OTP distribution).

Why would you want to profile CPU usage during compilation? Are you planning working on Erlang compilator (erlc)?

On Sun, Sep 23, 2018 at 12:12 AM Awsaf Rahman <[hidden email]> wrote:
Hello all,

I want to profile a few Erlang programs I wrote. Basically, I want to find out the following: 
1) CPU and memory usage during compilation
2) CPU and memory usage during execution

Is there anyway I can do this? 

Kind regards
Awsaf
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


--
Best regards,
Paul Peregud
+48602112091

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Memory usage

Richard O'Keefe
The kind of comparison you want is fraught with difficulty.
There are, for example, several different Haskell compilers.
GHC, of course, is *the* Haskell compiler, but UHC is still
a contender, and LHC is coming along.  If you are happy with
Haskell 98, JHC is still around.

You cannot actually benchmark *Haskell*, only a particular
Haskell compiler version with certain options on a particular
(kind of) machine running a particular operating system and
libraries.  So let's stick with GHC.  Depending on exactly
what you have, GHC has *at least* two different back ends.
It also has more optimisation options than any sane
programmer wants to think about.  The effects of something
like -ffull-laziness can be anything between very welcome and
spectacularly unhelpful.  Understanding performance in a non-
strict language is tricky, and as a tip for beginners, see if
you understand the difference between foldl and foldl' .

And of course, GHC is actively maintained.  I'm using Ubuntu
Linux 18.04 (Bionic Beaver) and the latest version of GHC
available from the Ubuntu repository is 8.0.2.  The current
stable release is 8.4.3.  The current release in beta is
8.6.1.  There have been four releases of GHC so far this year.
Do they all have the same performance for all programs?

Erlang is also very actively maintained, and also has at
least two back ends (BEAM and HiPE).

How big are the 10 programs and how long do you expect them
to run?


On Tue, 25 Sep 2018 at 16:25, Awsaf Rahman <[hidden email]> wrote:
I am trying to compare Erlang and Haskell based on compile time, execution time, memory usage and cpu usage for a set of 10 programs. I am not fluent in either of them and this is my first time trying benchmarking. 

On Sun, Sep 23, 2018 at 8:05 PM Paul Peregud <[hidden email]> wrote:
To profile CPU time, you can use fprof (part of OTP distribution).

Why would you want to profile CPU usage during compilation? Are you planning working on Erlang compilator (erlc)?

On Sun, Sep 23, 2018 at 12:12 AM Awsaf Rahman <[hidden email]> wrote:
Hello all,

I want to profile a few Erlang programs I wrote. Basically, I want to find out the following: 
1) CPU and memory usage during compilation
2) CPU and memory usage during execution

Is there anyway I can do this? 

Kind regards
Awsaf
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


--
Best regards,
Paul Peregud
+48602112091
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions