Announcement

Collapse
No announcement yet.

Mono 2.6 Released, Supports LLVM Generation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BlackStar
    replied
    I'm really interested in measuring memory usage correctly. According to link I gave, could you instruct me how did you measure real memory usage, please?
    My understanding is as follows (please correct any inaccuracies you find):
    • Virtual memory is the amount of memory requested by the program, which may or may not be in use.
    • Resident memory is the actual amount of memory in use.
    • Shared memory is the amount of memory that can be shared with other applications or between multiple instances of the same application (this accounts for shared objects, system libraries, etc).


    As a rule of thumb, low resident memory is the what you are interested in. If you have two programs with similar resident memories, the one with the highest shared memory wins. Virtual memory is not a useful metric when comparing memory usage.

    Managed (GC-enabled) applications tend to have slightly inflated virtual memory values (this is done for performance reasons - the details are interesting but rather technical for this discussion). For example, .Net/win32 always requests something like 8MB of memory on application startup - even if the application is only using 2MB of those. (These extra 6MB do not actually hurt performance, i.e. they won't cause you to run out of physical memory).

    Mono applications also tend to have lower shared memory values (this is a bad thing), because the runtime cannot share JIT-able bytecode. This can be improved using AOT on your binaries (AOT-ed binaries are shareable).

    Leave a comment:


  • kraftman
    replied
    Originally posted by ciplogic View Post
    You don't give a damn for devel time? Not a problem!
    Nope, if less development time means lower quality, performance, higher resource usage (however, according to some of your comments it should be better, but time will show). I'm talking for myself of course. I'm sure there are people who think different and who care about development time (I also care about this sometimes, but not in this case).

    I said what I think about comparing GNotes and Tomboy already. I gave you even better example - Firefox. You agreed Tomboy consumes 25% more memory and according to what you said it's like this: less development time - more memory usage. If this is correct I'll stick to what I said above.

    What I find strange is Gnome devs didn't care about things Blackstar and some fanboys scream about on their blogs or PG when there was just Java (or C# wasn't mature) and there wasn't MS-Novel deal. Even if C# is better then Java it means nothing, because afaik their goals, "advantages" are similar and if this is true, they should use Java since quite a long.

    The Shared Memory numbers are shown and they say how much is shared.
    I'm really interested in measuring memory usage correctly. According to link I gave, could you instruct me how did you measure real memory usage, please?
    Last edited by kraftman; 21 December 2009, 04:25 PM.

    Leave a comment:


  • ciplogic
    replied
    Originally posted by kraftman View Post
    GNote and Tomboy are utter mess, the same about F-Spot; or GNote share resources in Gnome and thus it's memory usage is lower then tools report. Like I said, Firefox uses about 20MB of memory just after start, so it's the same amount of memory as Tomboy uses just after start.
    (...)
    I'm not interested in developers time and bull what Icaza and co. say. I recommend to not starting a debate about "how mono is good for Linux" here, because there's a lot what can be said.
    The language in itself have a contribution of use some memory but the rest is about the design of application. In fact as Tomboy loads a lot of libraries (please make a bug report and try to profile) as GNote does, the memory consumption is big. The Shared Memory numbers are shown and they say how much is shared. Stating that GNote uses less, I shown in numbers: yes, by 25%. Please to install GNote and show your numbers. What I did said also is that: Mono is a runtime as glib is. You don't wanna use it, is your option: don't use Tomboy at the first time. As I'm a developer, I don't try to keep my decisions by sentimental picks. It will ask some extra memory to use it and because how application is kept and for some JIT code. It will also provide something already made, so will make things easier for developer.
    You don't give a damn for devel time? Not a problem! I write an F/OSS in .NET and if ever will really hope to never see persons that bully me
    if I will port it to Linux, but for now I really not have time for this. When a person will want, I really hope will take his time to port 1000 classes that already my project contains from C# to C++, and to look right away for dangling pointers, which is always a fun in a complex C++ application. Valgrind is really a nice tool for doing this!

    Leave a comment:


  • kraftman
    replied
    Originally posted by ciplogic View Post
    The setup was done in this way:
    - install default repository option that is in Ubuntu 9.10 repository on a 64 bit machine
    - use System Monitor after I enable all memory columns under: Edit->Preferences (this is not completely reliable but in general it scans the /proc folder and I found that numbers match)
    Kdevelop is completely broken in Ubuntu 9.10. You should also measure its memory usage in Kubuntu, but like I said they shipped broken and unfinished version. About its memory usage look at my response to Blackstar.

    I've told you already at least from technologial POV is that the Mono setup in most distros is suboptimal (that will solve the startup time to a closer range to a C++ like application. I mean that most applications are not precompiled with --aot that is default with Mono runtime). In rest I talked just about memory consumption. Did you noticed that?
    Closer range doesn't mean the same range. Of course I noticed, but I said why it's meaningless.

    Why you did ignore the fact that GNote takes around the same memory that Firefox does on your machine? Which is also a C++ application as Firefox is? (for my machine Firefox uses 230M/53M/23M which is not comparable with any GNote/Tomboy setup, but I just want to take the points right)
    There's such possibility:

    GNote and Tomboy are utter mess, the same about F-Spot; or GNote share resources in Gnome and thus it's memory usage is lower then tools report. Like I said, Firefox uses about 20MB of memory just after start, so it's the same amount of memory as Tomboy uses just after start.

    Why don't you take developer time in account also? I work in an opensource project (is a Windows one, for my bad), but if users wanna make an optimal setup, they should work with their distribution. Is not a fault of Mono per-se and it does not hurt opensource. Does Beagle froze your machine doing indexes? That problems for are long time solved (of course if you use search indexer at the first time). This application was the first made doing this because a developer stands and wrote code that you almost sure you will never pay doing a bug report. They do this work for free and for you. Do you wanna profile any application (regardless of language) and point out the bottlenecks in bug reports? .NET setup does at the end of install a full AOT for entire framework (it costs disk space, but disk space is cheap). When most distros will do it the same, things will get a bit faster on startup time. The compacting GC is less than 6 months away (is already there but is not enabled by default) so big GC pauses will be I think solved in 2.8 release.
    I am fully agree that is frustrating for you that you have to wait that your Mono application to start (or on any other framework). And you are free to pick (or why not, to write) your Qt version (or Gtk/GLib/C to try to get in love with Mono) of any application you wish. But taking out facts (like comparing one application with other out of context) will not help. In fact when I have to pick two applications: one written with Mono and one with C/GLib, excluding that is a big discrepancy in performance, I will pick always the Mono counterpart, and the reason is: startup time is only once, but bug fixing in a C# environment is much faster. Is not about fanboyism but is about having a good experience. I cannot imagine in your case that you just start and close tomboy all day long as you do it with gedit so you to get upset that Tomboy starts slow.
    I'm not interested in developers time and bull what Icaza and co. say. I recommend to not starting a debate about "how mono is good for Linux" here, because there's a lot what can be said. Btw. I'm talking about NOW and I have terrible experience with this.
    Last edited by kraftman; 21 December 2009, 11:06 AM.

    Leave a comment:


  • ciplogic
    replied
    Originally posted by kraftman View Post
    KDevelop isn't finished yet. I don't know about QTcreator. The fact is Tomboy consumes as much memory as Firefox. Btw. how did you measured Kdevelop and QTcreator memory usage?
    The setup was done in this way:
    - install default repository option that is in Ubuntu 9.10 repository on a 64 bit machine
    - use System Monitor after I enable all memory columns under: Edit->Preferences (this is not completely reliable but in general it scans the /proc folder and I found that numbers match)
    Originally posted by kraftman View Post
    You can say huge memory usage by Tomboy is just my personal impression. Why you both are starting talking about making apps when other people talk about something else - memory usage, startup time? Ignoring real disadvantages won't make things to advance neither.
    I've told you already at least from technologial POV is that the Mono setup in most distros is suboptimal (that will solve the startup time to a closer range to a C++ like application. I mean that most applications are not precompiled with --aot that is default with Mono runtime). In rest I talked just about memory consumption. Did you noticed that?
    Originally posted by kraftman View Post
    Why did you ignore the fact Tomboy used exactly the same amount of memory as Firefox? Btw. I opened four notes in Tomboy and memory usage raised to around 60MB.
    Why you did ignore the fact that GNote takes around the same memory that Firefox does on your machine? Which is also a C++ application as Firefox is? (for my machine Firefox uses 230M/53M/23M which is not comparable with any GNote/Tomboy setup, but I just want to take the points right)
    Why don't you take developer time in account also? I work in an opensource project (is a Windows one, for my bad), but if users wanna make an optimal setup, they should work with their distribution. Is not a fault of Mono per-se and it does not hurt opensource. Does Beagle froze your machine doing indexes? That problems for are long time solved (of course if you use search indexer at the first time). This application was the first made doing this because a developer stands and wrote code that you almost sure you will never pay doing a bug report. They do this work for free and for you. Do you wanna profile any application (regardless of language) and point out the bottlenecks in bug reports? .NET setup does at the end of install a full AOT for entire framework (it costs disk space, but disk space is cheap). When most distros will do it the same, things will get a bit faster on startup time. The compacting GC is less than 6 months away (is already there but is not enabled by default) so big GC pauses will be I think solved in 2.8 release.
    I am fully agree that is frustrating for you that you have to wait that your Mono application to start (or on any other framework). And you are free to pick (or why not, to write) your Qt version (or Gtk/GLib/C to try to get in love with Mono) of any application you wish. But taking out facts (like comparing one application with other out of context) will not help. In fact when I have to pick two applications: one written with Mono and one with C/GLib, excluding that is a big discrepancy in features, I will pick always the Mono counterpart, and the reason is: startup time is only once, but bug fixing in a C# environment is much faster. Is not about fanboyism but is about having a good experience. I cannot imagine in your case that you just start and close tomboy all day long as you do it with gedit so you to get upset that Tomboy starts slow.
    Last edited by ciplogic; 21 December 2009, 10:49 AM.

    Leave a comment:


  • kraftman
    replied
    Originally posted by BlackStar View Post
    In KDE..?



    (stupid 10 character limit)
    Yes:



    It is unfortunate that a lot of people don't understand the UNIX memory model. Unfortunately this is helped by tools like ps which are not able to provide accurate information about memory usage. In UNIX a process uses basically three kinds of memory segments: shared memory segments, code segments and data segments



    Be free and go to "catch up" with MS now...

    Leave a comment:


  • BlackStar
    replied
    Originally posted by kraftman View Post
    You make me laugh. I showed you before it's not so easy to measure memory usage in Linux. It's probably even harder to measure it in KDE... You're amazing me too.
    In KDE..?



    (stupid 10 character limit)

    Leave a comment:


  • kraftman
    replied
    Originally posted by BlackStar View Post
    Out of curiosity, I tested Visual Studio 2008 (I'm at work, so no Linux for me here... Numbers taken from Win7/amd64 with VS2008 Professional with the VisualSVN plugin loaded).

    With no project: 56MB, 42MB, 36MB
    With empty project: 80MB, 53MB, 50MB
    With WinForms project: 97MB, 59MB, 61MB

    Ouch, we have a long trip ahead of us until we can match those numbers (we = the open-source community). Fortunately, memory is relatively cheap so the discrepancy isn't all that problematic.
    You make me laugh. I showed you before it's not so easy to measure memory usage in Linux. It's probably even harder to measure it in KDE... You're amazing me too.

    Leave a comment:


  • BlackStar
    replied
    Originally posted by ciplogic View Post
    I've used to download some of the best IDEs for C++ and Mono world that are around.

    I've started two bigger applications to compare as much as possible apples to apples:
    - KDevelop (version 4) and MonoDevelop 2.0
    Memory usage is like this:
    KDevelop
    Without any project open: 165M, 76M, 32M
    crash on New Project
    MonoDevelop
    Without any project open: 89M 50M 22M
    One Gtk# project): 119M VM, 72M, 25.8M

    QtCreator
    With no project: 254M, 74M, 39.7M
    With one project: 324M, 119M, 48.8M

    (first: Virtual Memory, second: Resident Memory, last: Shared Memory)
    Those are stock repository options for developing using C# or C++ (of course there are Eclipse,Anjuta, GEdit or Vim, but regarding as options).
    Out of curiosity, I tested Visual Studio 2008 (I'm at work, so no Linux for me here... Numbers taken from Win7/amd64 with VS2008 Professional with the VisualSVN plugin loaded).

    With no project: 56MB, 42MB, 36MB
    With empty project: 80MB, 53MB, 50MB
    With WinForms project: 97MB, 59MB, 61MB

    Ouch, we have a long trip ahead of us until we can match those numbers (we = the open-source community). Fortunately, memory is relatively cheap so the discrepancy isn't all that problematic.

    Leave a comment:


  • kraftman
    replied
    Originally posted by ciplogic View Post
    I've used to download some of the best IDEs for C++ and Mono world that are around.

    I've started two bigger applications to compare as much as possible apples to apples:
    - KDevelop (version 4) and MonoDevelop 2.0
    Memory usage is like this:
    KDevelop
    Without any project open: 165M, 76M, 32M
    crash on New Project
    MonoDevelop
    Without any project open: 89M 50M 22M
    One Gtk# project): 119M VM, 72M, 25.8M

    QtCreator
    With no project: 254M, 74M, 39.7M
    With one project: 324M, 119M, 48.8M

    (first: Virtual Memory, second: Resident Memory, last: Shared Memory)
    Those are stock repository options for developing using C# or C++ (of course there are Eclipse,Anjuta, GEdit or Vim, but regarding as options).

    Virtual Memory is what a program asks. Like: malloc(...) calls. At this moment the OS will not commit memory, but will only know that the application may need this memory. The Resident Memory is what memory consumption is for real. At the end Shared Memory are common code part that are shared between more processes (like .so files).
    KDevelop isn't finished yet. I don't know about QTcreator. The fact is Tomboy consumes as much memory as Firefox. Btw. how did you measure Kdevelop and QTcreator memory usage?

    What we can conclude: loading too many libraries can make your application memory hog.
    Also, writing good code can make your application to know much more things like: refactoring, a very good debugger (that expands fields, etc.), without having to ask as much as a Qt application does.
    Also, if you are a developer you will like that build times are much smaller on the Mono counterpart.
    My point of this is: memory is cheap, and applications that you don't wanna run, you shouldn't but spreading FUD or only your personal impression instead to pick real values of the software, will not make things to advance.
    You can say huge memory usage by Tomboy is just my personal impression. Why you both are starting talking about making apps when other people talk about something else - memory usage, startup time? Ignoring real disadvantages won't make things to advance neither.

    Simply comparing GEdit with Tomboy is a dumb thing because they load different frameworks and do not solve the same problems. (for example Tomboy loads more libraries than GEdit, excluding Mono's ones, like the sync libraries, etc.)
    Taking GNote (a line-to-line port of Tomboy to C++) compared with Tomboy is like this: 51M, 25.5M, 16.5M vs 68M, 33M, 19.6M) So as far as I see is a 25% more memory consumption on the Mono counterpart.
    Why did you ignore the fact Tomboy used exactly the same amount of memory as Firefox? Btw. I opened four notes in Tomboy and memory usage raised to around 60MB.
    Last edited by kraftman; 21 December 2009, 10:21 AM.

    Leave a comment:

Working...
X