Windows 10: Slow memory allocation on Windows

Discus and support Slow memory allocation on Windows in Windows 10 BSOD Crashes and Debugging to solve the problem; Hi, I have implemented a program and found out that the performance of allocation a lot of memory is severely limited on Windows. Allocating and... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by igor-FX, Jan 30, 2019.

  1. igor-FX Win User

    Slow memory allocation on Windows


    Hi, I have implemented a program and found out that the performance of allocation a lot of memory is severely limited on Windows. Allocating and reusing a single chunk of memory (10 MB) is actually fast, but initializing a lot of new memory (30 GB) is very slow and surprisingly, the performance degrades increasing the number of threads allocating the memory. The same code compiled with the same compiler settings (g++ -O2) runs 2 to 8 times faster on Ubuntu on the same hardware. Compiling with VS2015 or gcc does not make a difference on Windows (hence I am asking here and not in a programming forum). I thought that Windows is crippling the AMD performance under contract for Intel, but Ubuntu outperforms Windows also with the Intel chips, although not to the same extent.


    The pseudo-code is essentially:

    for 8 or 32 threads in parallel

    allocate and initialize "30 GB divided by the number of threads", in blocks of 10 MB

    measure the initialization time here

    for 8 or 32 threads in parallel

    write new data into the same place that it has initialized above

    measure the memory reuse time here


    Here is the complete code in C++: https://www.dropbox.com/s/bsjj8b5oqm1noxg/HeapSpeed.cpp?dl=0


    Here are the timings for initializing 30 GB of memory on the heap (64 GB RAM available on the PC):


    - AMD Threadripper 16 cores with hyperthreading, quad-channel DDR4 (theoretical memory bandwidth should be about 80 GB/s)


    Memory initialization with 8 threads:

    Windows: 3 GB/s (bad!)


    Ubuntu: 14 GB/s


    Memory initialization with 32 threads:


    Windows: 2.5 GB/s (bad!)


    Ubuntu: 21 GB/s



    Memory reuse with 8 threads:

    Windows: 29 GB/s


    Ubuntu: 27 GB/s


    Memory reuse with 32 threads:


    Windows: 26 GB/s


    Ubuntu: 26 MB/s



    - Intel i7 4 cores with hyperthreading, quad-channel DDR3 (theoretical memory bandwidth should be about 25.6 GB/s)


    Memory initialization with 8 threads:

    Windows: 9 GB/s (bad!)


    Ubuntu: 17 GB/s



    Memory reuse with 8 threads:

    Windows: 32 GB/s (bad!)


    Ubuntu: 40 GB/s



    Is it possible to tweak the Windows settings to match the Ubuntu performances? Or are there specific compiler options for fast memory initialization? Or are there specific functions for threaded allocations? (the Parallel Patterns Library did not help)


    Many thanks!

    :)
     
    igor-FX, Jan 30, 2019
    #1

  2. Memory Allocation Question

    I am finding that I am consistently getting a message on my T-Mobile Dash that there is not enough memory to start certain application. Is there a way to allocate more memory to Program Memory, My device shows that I have 43.75MB total, 37.13 Used and
    6.63 Free. Can any of the Storage memory be allocated to the Program memory? Thanks
     
    yellowzebra, Jan 30, 2019
    #2
  3. kael_26 Win User
    Memory allocation

    Just wondering if anyone knows how the memory use is allocated on an E65, if there's any way to change it so that more is allocated to certain functions, and also if there is any way to remove programs/applications that I'll never use (Quickoffice, Teamsuite,
    etc).

    Reason being - repeated "Memory full. Close some applications and try again" messages being given when the phone has large amounts of free space and no applications are running.
     
    kael_26, Jan 30, 2019
    #3
  4. Slow memory allocation on Windows

    Memory Allocation Question

    You cannot allocate storage memory to program memory. What your can do is make sure that you doi not have a many applications running in the background. Windows mobile is a great multitasking OS. The problem is that it does not really close applications.
    It minimizes them and thus stay in memory. Use Task Manager to close these applications. Let me know if this helps.
     
    Linley Meslier, Jan 30, 2019
    #4
Thema:

Slow memory allocation on Windows

Loading...
  1. Slow memory allocation on Windows - Similar Threads - Slow memory allocation

  2. Windows memory allocation

    in Windows 10 Gaming
    Windows memory allocation: I have dell inspiron 15 , Ryzen 5 7000 series laptop. I am using windows 11.after installed Ubuntu 22.04, the memory allocation got reduced to 2GB usable out 8GB for Windows 11 .Kindly assist. As the windows 11 is getting many crashing errors and got the system slower....
  3. Windows memory allocation

    in Windows 10 Software and Apps
    Windows memory allocation: I have dell inspiron 15 , Ryzen 5 7000 series laptop. I am using windows 11.after installed Ubuntu 22.04, the memory allocation got reduced to 2GB usable out 8GB for Windows 11 .Kindly assist. As the windows 11 is getting many crashing errors and got the system slower....
  4. Out of video memory trying to allocate texture.

    in Windows 10 Gaming
    Out of video memory trying to allocate texture.: I have just 2 tabs opened on Microsoft edge and a game that required minimal to no graphics with all low settings. further my pc specs are Lenovo legion 5 intel i7 10th gen. with RTX 2060 graphic card and 16gb ram. I get this black rectangle in the bottom right of my screen...
  5. VmmemWSL Memory Allocation Issue

    in Windows 10 Gaming
    VmmemWSL Memory Allocation Issue: I've been using the Ubuntu app on my windows 11 laptop, after the most recent windows update I have had issues with VmmemWSL using all my RAM. Gone through wsl.config fixes and it's not working, it goes up to 7GB after just a few commands/python scripts.Please help!...
  6. VmmemWSL Memory Allocation Issue

    in Windows 10 Software and Apps
    VmmemWSL Memory Allocation Issue: I've been using the Ubuntu app on my windows 11 laptop, after the most recent windows update I have had issues with VmmemWSL using all my RAM. Gone through wsl.config fixes and it's not working, it goes up to 7GB after just a few commands/python scripts.Please help!...
  7. Out of video memory trying to allocate a texture!

    in Windows 10 Drivers and Hardware
    Out of video memory trying to allocate a texture!: So.... My problem is the ''Out of video memory trying to allocate a texture'' error ive tried many things to fix it /sfc scannow /verifier installing an older driver, virtual memory, unclocking my cpu etc. but none of them actually help the /verifier says theres a faulty...
  8. Limit Memory Allocated to Cached

    in Windows 10 Drivers and Hardware
    Limit Memory Allocated to Cached: My Windows OS and all hardware work great with 1.3GB of cached memory, but over time Windows will ask for more, without any good purpose. I don't want to allow Windows to use more than it needs, I need the other memory for other applications, and if Windows Caches memory its...
  9. error: HAL MEMORY ALLOCATION

    in Windows 10 BSOD Crashes and Debugging
    error: HAL MEMORY ALLOCATION: During start up, my laptop gives an error HAL MEMORY ALLOCATION, 0x000000AC and a blue screen. I have Lenovo ThinkPad T61, Windows 10 pro 64 bit, 2004. https://answers.microsoft.com/en-us/windows/forum/all/error-hal-memory-allocation/ed054c97-5087-497e-8b15-ea7cc2c49e53
  10. Increasing graphics video memory allocation

    in Windows 10 Customization
    Increasing graphics video memory allocation: How do I increase graphics video memory allocation? https://answers.microsoft.com/en-us/windows/forum/all/increasing-graphics-video-memory-allocation/c78dbb7a-a29a-49ff-a759-8ad770dda0f6

Users found this page by searching for:

  1. check windows 10 memory allocation running slow

    ,
  2. allocate 16 mb slow

    ,
  3. hi memory allocation

    ,
  4. 1 mb allocation windows slowdown