Results 1 to 8 of 8

Thread: Does 7-zip benchmark have somekind of affinity control ?

  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts

    Does 7-zip benchmark have somekind of affinity control ?

    im currenlty sitting at a Intel COre i7 920 system (4C/8T)
    i run 7-zip 16.02 benchmark 4 threads 32MB

    With normal full affinity i get 50% CPU usage in task manager as expected.
    If i set affinity to ever other cores then CPU usage drops til 25-33% sometimes even below 20%.
    In my head the 4 thread still gets access to 4 cores and should still be at 50% usage in task manager.

    So does 7-zip have some form of internal affinity or thread controls that conflicts with the windows affinity control ?

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,569
    Thanks
    777
    Thanked 687 Times in 372 Posts
    cpu usage is computed as non-idle time of each hardware thread, summed up and divided by 8. so you can easily load the entire cpu by running 4 threads, but it will be counted as 50% usage by Program Manager

  3. #3
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    I'm aware of that all depending on thread utilization/efficiency for the cores and that taskmanager basically just show time scheduling of the CPU not really utilization, but that is not the subject here.

    Having 4 CPU have threads show show 50% CPU usage in taskmanager with 8 (logical) cores
    It shouldn't matter which of the 8 logical cores the threads are target to in regards to the CPU time scheduler. (Performance and physical core utilization is a different story)
    Unless 7-zip does something with its threads to place it on specific logical cores it should not go down when i gives its 4 heavy threads access to only 4 logical cores instead of 8.
    This is a new behavior as i used to use 7-zip to benchmark the increase in performance, from going from full affinity to every other Logical affinity on a CPU with few physical cores than logical cores.
    However now the performance absolutely drops.

    Bah i just tried to take some screenshots but now its back to "normal" and its getting the 10% boost from "Disabling Hyper threading" by affinity, and the usage it the same full affinity or reduced affinity.

  4. #4
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    now it does it again hmm

    "full affinity.png" show the taskmanger reported CPU usage. its 50% when its at full affinity
    "half affinity.png" show how it drops to 25% when i set 7-zip to run on 4 cores (out of .

    It should still be 50%


    my guestimate is that 7-zip doessome kind of internal affinity like adjustments

    so lets say 7-zi[ puts its 4 threads to to core 0 1 2 3 4
    hen i go in and give set affinity to only 1 3 5 7.
    since out of its own chossen cores, 7-zip now only gets access to 1 & 3, so only 2 cores get utilized and it drops to 25% total utilization
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	half affinity.png 
Views:	68 
Size:	126.3 KB 
ID:	4594   Click image for larger version. 

Name:	full affinity.png 
Views:	70 
Size:	144.4 KB 
ID:	4593  

  5. #5
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    A bit more info or "evidence"

    running 7-zip with full affinity and selecting 4 threads. we should still see a kinda even utilization across the cores over times due to Windows modified round robin distribution.
    but 7-zip seems to avoid 2 of the 8 cores entirely.

    -- edit --
    and it seems to change it from benchmark iteration to iteration
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	taksman6c.png 
Views:	69 
Size:	45.4 KB 
ID:	4596   Click image for larger version. 

Name:	taskman6cb.png 
Views:	67 
Size:	48.8 KB 
ID:	4597  

  6. #6
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    hmm Linpack show same behevaier how ever it uses 8 threades when loading/setting up its data array and swithched to 4 cores duringg crunhing.
    It only discard 1 core so its 50% is sprread out on 7 logical cores.

    if i set affinity to every other cores except ( not the discared one) it still stay on 50%
    but if i reverse it so it gets every other one includign the discard one it drops to 33% usage which agian indicates there is somekind of blockage in the software to use the "discarded core" outside of the normal affinity control.

    The same holds true if i monitor which cores they "Discard" and work affinity settings around it the utilization stays up

    In both 7-zip or linpack case they dont discard cores when running 8(+)threads.

    Its just seems like a weird behavior and im now no longer sure it 7-zip/linpack related or if its windows or HW platform

  7. #7
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    I just downloaded cinemark R15 becaise its yet another program that scales really well across cores and have an easy way to control threads
    I set it to 4 threades, and gave it affinity to core 1 3 5 7 on my core i920 (4C/8T)

    Instantly the CPU utilization dropped from 50% to 25 and lo and behold. only core 1 and 3 is being utilized at all
    see first image (Cinemark4T4C.png)


    The second image (Cinemark4T8C.png) show the CPU utilization when its running 4 threads full affinity.
    the 4 threads get distributed around on the 7 of the 8 cores where as the last core has not utilization.
    I started up pngout to compress an image and then 8th core would get some utilization so its not a system wide "discard". its locally to the multi threaded software.
    but i dont think its the software itsellf since both 7-zip linpack and cinebench shows this weird behavioer


    -- edit --
    rinning 5 threads or 6 threads does not "discard a core", there is utilization on all 8 cores over time
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Cinemark4T4C.png 
Views:	139 
Size:	47.7 KB 
ID:	4598   Click image for larger version. 

Name:	Cinemark4T8C.png 
Views:	52 
Size:	40.5 KB 
ID:	4599  

  8. #8
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    920
    Thanks
    57
    Thanked 113 Times in 90 Posts
    in case somebody have the same issue. the reason is core parking.

    its amazing that windows decide to keep a core parked even though you assign a CPU heavy thread to it by affinity.

  9. Thanks:

    Bulat Ziganshin (8th September 2016)

Similar Threads

  1. 7-Zip
    By Vacon in forum Data Compression
    Replies: 556
    Last Post: 7th February 2020, 14:30
  2. 7-zip benchmark. Bloomfield vs Core2Quad
    By SvenBent in forum Data Compression
    Replies: 6
    Last Post: 3rd November 2008, 22:19
  3. 7-zip
    By squxe in forum Forum Archive
    Replies: 19
    Last Post: 9th April 2008, 22:26
  4. QuickLZ ZIP - new zip/deflate library
    By Lasse Reinhold in forum Forum Archive
    Replies: 23
    Last Post: 1st October 2007, 22:08
  5. Hash Zip
    By Black_Fox1 in forum Forum Archive
    Replies: 6
    Last Post: 4th March 2007, 17:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •