Pep Posted May 1, 2020 Share Posted May 1, 2020 Source: https://github.com/pleriche/FastMM5 Experience/opinions on FastMM5: https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/ A very simple test of comparing an uniGUI app comipled with Native manager versus New FastMM5 manager : Native Manager: New FastMM5 Manager : 5 2 Quote Link to comment Share on other sites More sharing options...
Pep Posted May 1, 2020 Author Share Posted May 1, 2020 Speed Test using "Stress Test Tool" Native Manager: 0:04:24 FastMM5: 0:01:57 Native Manager FastMM5 3 Quote Link to comment Share on other sites More sharing options...
picyka Posted May 1, 2020 Share Posted May 1, 2020 Does it work well like eurekalog? Quote Link to comment Share on other sites More sharing options...
mierlp Posted May 2, 2020 Share Posted May 2, 2020 Hi Be aware that the license has been changed at the same time. You now have the option of commercial (from $ 99 per dev) or GPL-v3. The fact that he is going to ask for money is not so bad, it's the way how Quote Link to comment Share on other sites More sharing options...
Pep Posted May 9, 2020 Author Share Posted May 9, 2020 On 5/1/2020 at 6:33 PM, picyka said: Does it work well like eurekalog? https://eurekalog.blogspot.com/2020/05/support-for-fastmm-5-is-available-in.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+EurekaLog+(EurekaLog's+blog) 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted May 18, 2020 Share Posted May 18, 2020 It would be nice to have a tutorial on how to use FastMM on unigui, how to configure it. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 18, 2020 Share Posted May 18, 2020 5 hours ago, picyka said: It would be nice to have a tutorial on how to use FastMM on unigui, how to configure it. This is for FastMM4 : http://delphiprogrammingdiary.blogspot.com/2018/09/fastmm-and-how-to-use-in-delphi-project.html https://delphibistro.com/?p=186 I wil try to get it for the new version FastMM5 ? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 19, 2020 Share Posted May 19, 2020 FastMM5 : Investigation... https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/?do=findComment&comment=22714 @Pep Do you have some advise ? Thx Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 19, 2020 Share Posted May 19, 2020 On 5/18/2020 at 12:42 PM, picyka said: It would be nice to have a tutorial on how to use FastMM on unigui, how to configure it. The good news has come ! https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/?do=findComment&comment=22717 FastMM5 USAGE : 1. Downloaded the latest FastMM5 from https://github.com/pleriche/FastMM5 2. Replace the Original BorlndMM.dll : C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\BorlndMM.dll By the newer (i complided FastMM5-master\BorlndMM DLL ) 3. Add to the Library : Options > Delphi > Langage > Library ...\FastMM\FastMM5-master\FastMM5-master 4. Add the first uses on the Project (Main program) uses {$IFDEF DEBUG} FastMM5, {$ENDIF} 5. begin ReportMemoryLeaksOnShutdown := True; end; Test with this simple test : procedure TForm1.FormCreate(Sender: TObject); var L:TStrings; begin L:=TStringList.Create; end; And Close the Application : you will see MemoryLeaks 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted May 19, 2020 Share Posted May 19, 2020 11 minutes ago, Abaksoft said: The good news has come ! https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/?do=findComment&comment=22717 FastMM5 USAGE : 1. Downloaded the latest FastMM5 from https://github.com/pleriche/FastMM5 2. Replace the Original BorlndMM.dll : C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\BorlndMM.dll By the newer (i complided FastMM5-master\BorlndMM DLL ) 3. Add to the Library : Options > Delphi > Langage > Library ...\FastMM\FastMM5-master\FastMM5-master 4. Add the first uses on the Project (Main program) uses FastMM5, 5. begin ReportMemoryLeaksOnShutdown := True; end; Test with this simple test : procedure TForm1.FormCreate(Sender: TObject); var L:TStrings; begin L:=TStringList.Create; end; And Close the Application : you will see MemoryLeaks And how would it be in unigui, can you put an example here? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 19, 2020 Share Posted May 19, 2020 1 hour ago, picyka said: And how would it be in unigui, can you put an example here? The same way. For closing your uniguiApplication, close it from TrayIcone (on the bottom beside windows Date). Note : test memoryleaks only on Debug Mode (not Release). 1 Quote Link to comment Share on other sites More sharing options...
Pep Posted May 20, 2020 Author Share Posted May 20, 2020 15 hours ago, Abaksoft said: FastMM5 : Investigation... https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/?do=findComment&comment=22714 @Pep Do you have some advise ? Thx Hello Abaksoft, Thanks for the information, when I did the speed tests I did not verify that the "ReportMemoryLeaksOnShutdown" option was still working and now thanks to your detailed indications and suggestions I see that this option now works correctly. It is important to note that this option is only available in the version of FastMM5 that was released yesterday !! Thank you so much. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 27, 2020 Share Posted May 27, 2020 in view of what I have read, we can use FastMM also in Release mode (a better memory management and Performance). How to : put it on the first Uses (.dpr file) : uses FastMM5, .... begin end. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 27, 2020 Share Posted May 27, 2020 Can I use version 10.1 Berlin? Quote Link to comment Share on other sites More sharing options...
azago Posted May 27, 2020 Share Posted May 27, 2020 From https://github.com/pleriche/FastMM5 Supported Compilers Delphi XE3 and later Supported Platforms Windows, 32-bit and 64-bit Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 29, 2020 Share Posted May 29, 2020 On 5/27/2020 at 11:10 AM, Abaksoft said: in view of what I have read, we can use FastMM also in Release mode (a better memory management and Performance). How to : put it on the first Uses (.dpr file) : uses FastMM5, .... begin end. Erratum : As said by Mierlp and shown on the FastMM Forum : Using FastMM5 now, "require to pay for a license if your project is not GPL/LGPL itself". https://en.delphipraxis.net/topic/2749-experienceopinions-on-fastmm5/?do=findComment&comment=23123 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted June 5, 2020 Share Posted June 5, 2020 Hi Experts, I detect a small problem with FastMM5 in Delphi 10.3.3 Pro. This happens only with Unigui / FastMM5 No problem with VCL / FastMM5 No problem with Unigui / FastMM4 Just test this : 0. Add Library (32) : ...\FastMM\FastMM5-master\FastMM5-master 1. Run Delphi 10.3.3 Pro (with original borlndmm.dll in ..\bin) 2. Open ...\FastMM5-master\BorlndMM DLL\BorlndMM.dpr 3. Compile (Relase or Debug) 4. Quit Delphi 5. Just rename the original as : borlndmm_OLD.dll and replace it by the newer : BorlndMM.dll 5. Run Delphi 6. Quit Delphi then the message : "Invalide Pointer Operation" raises ! followed by : Acces Vilation at adress 2172415C in Module 'bds.exe', Read of adress 2172415C Note : Whit the original EMB (BorlndMM.dll) no problem in Unigui. I wrote to Pierre Leriche, but I had to delete my message, since the problem only appears with Unigui. The conclusion I came to is to use FastMM4 with Unigui, since it is totally free and is stable. _________ Regards. 1 Quote Link to comment Share on other sites More sharing options...
Maxim Masiutin Posted June 15, 2020 Share Posted June 15, 2020 Here is the single-threading performance comparison between FastMM5 (FastMM v5.01 dated Jun 12, 2020 and FastMM4-AVX v1.03 dated Jun 14, 2020). This test is run on Jun 16, 2020, under Intel Core i7-1065G7 CPU (base frequency: 1.3 GHz, 4 cores, 8 threads). Compiled under Delphi 10.3 Update 3, 64-bit target. FastMM5 AVX-br. Ratio ------ ------ ------ ReallocMem Small (1-555b) benchmark 9285 7013 24.47% ReallocMem Medium (1-4039b) benchmark 12002 10186 15.13% Block downsize 12463 9474 23.98% VerySmall downsize benchmark 12025 11012 8.42% Address space creep benchmark 14212 10845 23.69% Address space creep (larger blocks) 16237 13629 16.06% Single-threaded reallocate and use 15462 13750 11.07% Single-threaded tiny reallocate and use 9263 7203 22.24% Single-threaded allocate, use and free 14885 14211 4.53% You can find the program, used to generate the benchmark data,at https://github.com/maximmasiutin/FastCodeBenchmark You can find FastMM4-AVX branch at https://github.com/maximmasiutin/FastMM4-AVX On the tests above demonstrated, FastMM4-AVX branch is faster than FastMM5. Besides that, FastMM5 uses "Winapi.Windows.SwitchToThread" call in multi-threading in an attempt to obtain a lock of a block manager. The "SwitchToThread" call is not a very efficient way in a spin-lock loop. A better way, even recommended by Intel, is to use "pause" instruction, e.g. 5000 times, and only then if it would not help, call "SwitchToThread". Usually, "pause" will help and the spin-lock will release before reaching 5000 iterations, so no "SwitchToThread" call will be needed. The following should also be taken into consideration: (1) Each call to SwitchToThread() experiences the expensive cost of a context switch, which can be 10000+ cycles; (2) It also suffers the cost of ring 3 to ring 0 transitions, which can be 1000+ cycles; (3) SwitchToThread() may be of no use if no threads are in the ready state. The FastMM4-AVX branch checks if the CPU supports SSE2 and thus the "pause" instruction, it uses "pause" spin-loop for 5000 iterations before calling "SwitchToThread". If a CPU doesn't have the "pause" instruction or Windows doesn't have the SwitchToThread() API function, it will use EnterCriticalSection/LeaveCriticalSection. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted June 25, 2020 Share Posted June 25, 2020 On 6/16/2020 at 1:38 AM, Maxim Masiutin said: You can find FastMM4-AVX branch at https://github.com/maximmasiutin/FastMM4-AVX Hi Maxim, I do not know if that can help you, but I detected a small problem with the borlndmm.dll (suggested in your Pack FastMM4-AVX v1.03 dated Jun 14, 2020) : UniPageControl + borlndmm.dll (FastMM4-AVX v1.03) = AV If you are familiar with Unigui : 1. Create a new Empty Unigui Project, 2. Place on the Main UniPageControl 3. On UniPageControl, Creat a New Page 4. Save Project 5. File > Close Project You will see the AV. The problem not occurs with the Original borlndmm.dll camed from EMB. _________________ Delphi 10.3.3 Pro Best Regards AV_50067A6_RTL260BPL_80808088.txt Quote Link to comment Share on other sites More sharing options...
Pep Posted August 14, 2020 Author Share Posted August 14, 2020 New comparison between FastMM4 / AVX / FastMM5 from Delphi.cz https://www.beginend.net/view.dws?114441 1 Quote Link to comment Share on other sites More sharing options...
TimKieu Posted June 25, 2022 Share Posted June 25, 2022 FastMM4-AVX seems to be better for Linux, Macos platform. Stress Test Tool is good but you should try the wrk tool https://github.com/wg/wrk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.