Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go ยป
No member browsing this thread
Thread Status: Active
Total posts in this thread: 33
Posts: 33   Pages: 4   [ 1 2 3 4 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 4389 times and has 32 replies Next Thread
!evil
Cruncher
Joined: Aug 3, 2023
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
~35% sys calls, ok?

Hi,

I noticed that MCM spends a lot of time in kernel space and `strace` shows enourmous amounts of

...
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
times({tms_utime=133602 /* 1336.02 s */, tms_stime=71663 /* 716.63 s */, tms_cutime=0, tms_cstime=0}) = 1431858097
...

Is this intended?
[Aug 3, 2023 8:26:03 AM]   Link   Report threatening or abusive post: please login first  Go to top 
hchc
Veteran Cruncher
USA
Joined: Aug 15, 2006
Post Count: 806
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

This question is interesting but also highly technical. You'd probably have better luck finding out who developed the science application that MCM1 uses and contact the developer(s) directly (e-mail, even phone or snail mail).
----------------------------------------
  • i5-7500 (Kaby Lake, 4C/4T) @ 3.4 GHz
  • i5-4590 (Haswell, 4C/4T) @ 3.3 GHz
  • i5-3570 (Broadwell, 4C/4T) @ 3.4 GHz

[Aug 14, 2023 1:28:42 AM]   Link   Report threatening or abusive post: please login first  Go to top 
thunder7
Senior Cruncher
Netherlands
Joined: Mar 6, 2013
Post Count: 232
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

Are you able to code in c? There is the ld_preload mechanism, where you can override libc for a single function call. I wonder what would happen if you created a local times() function call that used a 1-1000 loop, calling the real times() the first time, and returned -1 the other 999 times. Might that speed up things, of will boinc error out on receiving a -1?
[Aug 14, 2023 4:49:24 AM]   Link   Report threatening or abusive post: please login first  Go to top 
!evil
Cruncher
Joined: Aug 3, 2023
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

I just tried but don't know how to inject the env variable. Setting it for boinc makes no difference. If anyone wants to spend more time on this, here is the code (compiled with gcc -fPIC -shared -o /path/to/file.so /path/to/file.c)

#include <sys/times.h>
#include <dlfcn.h>

typedef clock_t (*real_times_t)(struct tms*);

struct tms previous_tms;
clock_t previous_clock;
int i = 1000;

clock_t times(struct tms *buf) {
if (i == 1000) {
previous_clock = ((real_times_t)dlsym(RTLD_NEXT, "times"))(&previous_tms);
i = 1;
} else {
i = i + 1;
}
*buf = previous_tms;
return previous_clock;
}


I don't expect a solution, its just a technical note which might help the MCM Team. And they should keep half an eye on the forum for things like this imo.
[Aug 14, 2023 7:29:16 PM]   Link   Report threatening or abusive post: please login first  Go to top 
AgrFan
Senior Cruncher
USA
Joined: Apr 17, 2008
Post Count: 376
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

See this thread for more details re: performance degradation between Windows and Linux ...
https://www.worldcommunitygrid.org/forums/wcg...ead,44664_offset,0#681380

Right now, it's best to run MCM on Windows and SCC on Linux using separate device profiles. SCC uses VINA which runs quicker on Linux than Windows.
----------------------------------------
[Edit 6 times, last edit by AgrFan at Aug 15, 2023 12:21:32 AM]
[Aug 15, 2023 12:11:49 AM]   Link   Report threatening or abusive post: please login first  Go to top 
!evil
Cruncher
Joined: Aug 3, 2023
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

Ah, I see. Thanks for pointing there! Then I discourage trying the LD_PRELOAD stuff xD
[Aug 15, 2023 6:44:58 AM]   Link   Report threatening or abusive post: please login first  Go to top 
thunder7
Senior Cruncher
Netherlands
Joined: Mar 6, 2013
Post Count: 232
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

I don't have any of the longer MCM tasks at the moment (which took >4 hours on an aging Xeon V4 with 2.2 GHz).

But I suspect the place to add that LD_PRELOAD variable is the wcg* files in /var/lib/boinc/projects/www.worldcommunitygrid.org. Those are actully running the work, so exchanging one of them for a bash-wrapper that sets LD_PRELOAD and then calls the original executable and passes all commandline arguments might work.

But I agree getting a new/better version of this seemingly inefficient executable would be better.

It doesn't seem to be open source, to more than offer to test it I can't do, I'm afraid.
----------------------------------------
[Edit 2 times, last edit by thunder7 at Aug 15, 2023 11:42:20 AM]
[Aug 15, 2023 11:36:00 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Speedy51
Veteran Cruncher
New Zealand
Joined: Nov 4, 2005
Post Count: 1297
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

See this thread for more details re: performance degradation between Windows and Linux ...
https://www.worldcommunitygrid.org/forums/wcg...ead,44664_offset,0#681380

Right now, it's best to run MCM on Windows and SCC on Linux using separate device profiles. SCC uses VINA which runs quicker on Linux than Windows.

I agree with you if you are wanting to return results as fast as possible.
My thoughts are with the limited amount of work there seems to be at the moment the quicker we return it the quicker we may run out of work

in regards to speeding MCM up I am sure if it can be done & the scientists want done it would have been done a considerable time ago. I will only run applications issued to me by World Community Grid

Have a great day
----------------------------------------

[Aug 16, 2023 11:14:15 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Sgt.Joe
Ace Cruncher
USA
Joined: Jul 4, 2006
Post Count: 7687
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

I agree with you if you are wanting to return results as fast as possible. My thoughts are with the limited amount of work there seems to be at the moment the quicker we return it the quicker we may run out of work


It is not a question of returning results as soon as possible, but of trying to run the work units where they are the most efficient. I would like to deploy my electricity where it does the most work per watt.

Cheers
----------------------------------------
Sgt. Joe
*Minnesota Crunchers*
[Aug 17, 2023 12:05:22 AM]   Link   Report threatening or abusive post: please login first  Go to top 
AgrFan
Senior Cruncher
USA
Joined: Apr 17, 2008
Post Count: 376
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: ~35% sys calls, ok?

I agree with you if you are wanting to return results as fast as possible. My thoughts are with the limited amount of work there seems to be at the moment the quicker we return it the quicker we may run out of work


It is not a question of returning results as soon as possible, but of trying to run the work units where they are the most efficient. I would like to deploy my electricity where it does the most work per watt.

Cheers

+1
[Aug 17, 2023 2:59:55 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 33   Pages: 4   [ 1 2 3 4 | Next Page ]
[ Jump to Last Post ]
Post new Thread