mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet

Reply
 
Thread Tools
Old 2015-04-02, 16:17   #914
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

29×113 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
You could change the <form> method from "get" to "post" for immediate effect, which on the plus side gives the user a warning if they try to refresh to the page, but on the downside would cripple your ability to do what you did in perusing the logs to see what requests for assignments were made when. You could of course add additional internal logging at the (start of) the generate-assignments code, but that's more work to replicate what's currently captured in the httpd logs.

You should put in a server-side check to prevent malicious people from bypassing your client-form limits. Easily done: change the one line in the code:
Code:
// was:
//$found_assignments++;

// change to:
if ($found_assignments++ > (12*50)) {
  break;
}
Of course, putting the magic numbers into constants/variables in the code makes it easier to maintain.
Thanks, that might be useful. I saw the existing limit on the LL assignment request that forces it to no more than 2 per worker, so I thought about doing something similar either per worker or in aggregate like you suggest.

Regarding the comments from others about not being happy limiting this, bear in mind this is a limit on how many you can request at one time, and it has everything to do with server performance, not about artificially limiting how much work in total a user can have.

Later tonight I'm hoping to get a chance to peruse the assignment code and see if there are any ways to streamline. I see the function that does it, I just haven't actually looked at it at all.

Even if I find any possible ways to improve it, those are things I'd definitely want to have James and George consider because breaking that or doing something unintended would be "a very bad thing"
Madpoo is offline   Reply With Quote
Old 2015-04-02, 17:11   #915
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

29·113 Posts
Default

Quote:
Originally Posted by Madpoo View Post
Later tonight I'm hoping to get a chance to peruse the assignment code and see if there are any ways to streamline. I see the function that does it, I just haven't actually looked at it at all.
I took a quick peek at it for now... you know, the whole assignment process is really complicated. :)

It looks at a lot of different things when determining what to assign to specific users. I mean, it takes into account the confidence level of the computer, whether the user has opted to work on critical assignments, whether it's a new user with no history at all, etc.

Based on all of these inputs, it makes decisions on whether to return LL tests that may or may not need more factoring or hasn't had P-1 work done yet. It has to consult the table of exponent thresholds for different types and use that to set a range or limit any user selected range. Then it has to do this X amount of times for all the assignments being asked for. If this is done by the client, it looks at how many days it should take to complete each one and then hands out enough so that the client has enough, etc.

So... yeah, I guess 300ms per assignment doesn't seem that crazy after all.

What I'd have to focus on, rather than trying to reinvent the wheel there, are ways to optimize any particular steps along the way.

But I wanted to point out to everyone that the system George has in place is a bit more complex under the hood than you might expect. Be sure and thank him when you get the chance. It can't have been easy to get that all together in the first place. I suppose some of that would be Scott's work as well, and I don't know who else along the way has contributed, but they should all be recognized for their efforts.
Madpoo is offline   Reply With Quote
Old 2015-04-02, 17:33   #916
NBtarheel_33
 
NBtarheel_33's Avatar
 
"Nathan"
Jul 2008
Maryland, USA

3×7×53 Posts
Default

Quote:
Originally Posted by Madpoo View Post
I took a quick peek at it for now... you know, the whole assignment process is really complicated. :)

It looks at a lot of different things when determining what to assign to specific users. I mean, it takes into account the confidence level of the computer, whether the user has opted to work on critical assignments, whether it's a new user with no history at all, etc.

Based on all of these inputs, it makes decisions on whether to return LL tests that may or may not need more factoring or hasn't had P-1 work done yet. It has to consult the table of exponent thresholds for different types and use that to set a range or limit any user selected range. Then it has to do this X amount of times for all the assignments being asked for. If this is done by the client, it looks at how many days it should take to complete each one and then hands out enough so that the client has enough, etc.

So... yeah, I guess 300ms per assignment doesn't seem that crazy after all.

What I'd have to focus on, rather than trying to reinvent the wheel there, are ways to optimize any particular steps along the way.

But I wanted to point out to everyone that the system George has in place is a bit more complex under the hood than you might expect. Be sure and thank him when you get the chance. It can't have been easy to get that all together in the first place. I suppose some of that would be Scott's work as well, and I don't know who else along the way has contributed, but they should all be recognized for their efforts.
The time and effort that George et al. have put into this project so that we users may not only efficiently participate, but also have fun doing so, is unbelievable. The fact that the system has evolved without breaking down completely or without everyone losing interest in the project, over nearly *two decades* (an eternity in the age of the Web), is an awesome testament to the effort and rigor that make it an honor to be involved in GIMPS.

Last fiddled with by NBtarheel_33 on 2015-04-02 at 17:34
NBtarheel_33 is offline   Reply With Quote
Old 2015-04-02, 17:44   #917
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

60658 Posts
Default

Quote:
Originally Posted by Madpoo View Post
It looks at a lot of different things when determining what to assign to specific users...
Based on all of these inputs, it makes decisions ... Then it has to do this X amount of times for all the assignments being asked for.
From my brief look at the code a while back I believe it does this completely independently for each assignment request. If so, one obvious optimization is to figure out what type of assignments are suitable for this user only once, and then fetch however many assignments meet that criteria.

But I know it's a big scary chunk of code that does many things, which is why I didn't dare touch it.
James Heinrich is online now   Reply With Quote
Old 2015-04-02, 21:49   #918
flagrantflowers
 
Apr 2014

27 Posts
Default

Quote:
Originally Posted by NBtarheel_33 View Post
George et al. have put into this project
I would personally count you as part of that group. Without you I think it would have been a long ways off to a new server.
flagrantflowers is offline   Reply With Quote
Old 2015-04-02, 22:06   #919
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

29×113 Posts
Default

Quote:
Originally Posted by Madpoo View Post
I mocked up a few design-only changes to the manual assignment page:
http://www.mersenne.org/manual_assig...fault.mock.php
...
I updated the mockup page above to show a running count of the total assignments being requested, and a rough guesstimate of how long it will take to generate.

Javascript is not something I'm familiar with at all. If you look at the source and the script seems a little kludgy, that's because I cut and paste some examples to do what I needed and shoe-horned it into the page. It works and that's all I care about.
Madpoo is offline   Reply With Quote
Old 2015-04-02, 22:42   #920
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

63158 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
From my brief look at the code a while back I believe it does this completely independently for each assignment request. If so, one obvious optimization is to figure out what type of assignments are suitable for this user only once, and then fetch however many assignments meet that criteria.

But I know it's a big scary chunk of code that does many things, which is why I didn't dare touch it.
Absolutely right on both counts. It calls the whole set of things on each assignment (even though we would assume most of the information is the same from request to request, except "how many other assignments does this user/CPU have?"

And yeah, it's so complicated looking at first glance, I'm a little intimidated.

There probably needs to be some overhauling at some point. At least add something so it passes along a "how many assignments" to the function and it can skip a lot of the redundant stuff. The SQL query itself that gets them could just get a "top X" instead of "top 1", but that would entail updating everything that calls it to work with an array of results.

For now I'd be happy to find some micro-tweaks... optimizations in any step along the way that shaves a few milliseconds here and there.

After all, getting it from 300ms to 250ms per assignment...it starts to add up. Redesigning it entirely, I wouldn't be surprised if it took less than half the time, or a third of the time, but that's a pretty big investment in time there. And at least right now, aside from a few edge cases, it's just easier to "solve" it by trying to avoid it in the short term.
Madpoo is offline   Reply With Quote
Old 2015-04-06, 05:35   #921
snme2pm1
 
"Graham uses ISO 8601"
Mar 2014
AU, Sydney

3618 Posts
Default

Quote:
Originally Posted by Madpoo View Post
Regarding the comments from others about not being happy limiting this, bear in mind this is a limit on how many you can request at one time, and it has everything to do with server performance, not about artificially limiting how much work in total a user can have.
Please explain further, what is the real issue at stake?
Are you finding that the way that manual assignment allocation currently operates is blocking lots of other server activity?
That's ghastly if true, though I wouldn't have wanted to assume that.
If one were to attempt allocation of an extent of assignments, is the server neglecting to service other requisitions during that period rather then multithread portions of that request?
Earlier this day I did externally request serial assignment allocation for each of the unfactored bulk of 1,3xx,xxx, but it took a lengthy amount of real time, though I didn't need to watch thought the period.
I object to the alternative task of multiple error prone efforts of partial assignment of small extents, even if such were available in that region.
I want to reduce the need for my attendance at keyboard; sometimes I might press a wrong button.
Seriously, is the server more or less impacted by such alternative iterative and elongated communication, compared to fulfilling a large extent 100k brick as a single web page assignment request?
I suspect that most people are without a convenient facility to remotely request bulk assignments as I have just described.
snme2pm1 is offline   Reply With Quote
Old 2015-04-06, 06:05   #922
axn
 
axn's Avatar
 
Jun 2003

5×23×41 Posts
Default

Quote:
Originally Posted by snme2pm1 View Post
Please explain further, what is the real issue at stake?
Please read from post # 880 onwards to understand the context of this discussion.
axn is offline   Reply With Quote
Old 2015-04-06, 09:28   #923
S485122
 
S485122's Avatar
 
Sep 2006
Brussels, Belgium

158210 Posts
Default Exponent Status Distribution errors ?

Looking at the Exponent Status Distribution I see a few anomalies :

In the 42M range there is one exponent more than there are primes in the range : the count (number of primes) should be equal to the sum of number of prime(s), composites and unproven exponents. I queried the database and it I found one less double-checked exponent (i.e.. 325 and not 326.) It must be a left over from the obfuscation at the time of the discovery of M(42643801) there was some work (P-1 and factoring) done after it was proven prime, see 42643801 status.

In the status page of Mersenne primes the verifiers are not listed, perhaps they should be ? The full details of 43112609 for instance are empty.

Then in the ranges 69M, 74M, 75M, 77M, 79M, 82M, 86M, 87M, 89M, 92M, 93M, 154M, 167M, 177M, 216M, 256M, 332M, 335M, 347M, 399M, 553M, 562M, 571M and 595M the total of unproven exponents is not equal to the total of assigned plus unassigned exponents : some exponents are missing.

Finally some exponents must be doubly assigned in the the ranges 57M, 72M, 520M, 530M and 875M (but it could be just a problem of tallying while transactions are busy.)

Jacob

Last fiddled with by S485122 on 2015-04-06 at 09:47 Reason: Found some work done after primality discovery
S485122 is online now   Reply With Quote
Old 2015-04-06, 14:07   #924
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2·43·83 Posts
Default

I spot checked several of those counts this hour and they are OK.

Quote:
Originally Posted by S485122 View Post
(but it could be just a problem of tallying while transactions are busy.)

That is the most likely cause. If you see the counts off several hours in a row, then we have a problem.
Prime95 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Official "Faits erronés dans de belles-lettres" thread ewmayer Lounge 39 2015-05-19 01:08
Official "all-Greek-to-me Fiction Literature and Cinema" Thread ewmayer Science & Technology 41 2014-04-16 11:54
Official "Lasciate ogne speranza" whinge-thread cheesehead Soap Box 56 2013-06-29 01:42
Official "Ernst is a deceiving bully and George is a meanie" thread cheesehead Soap Box 61 2013-06-11 04:30
Official "String copy Statement Considered Harmful" thread Dubslow Programming 19 2012-05-31 17:49

All times are UTC. The time now is 18:33.

Mon Oct 26 18:33:47 UTC 2020 up 46 days, 15:44, 0 users, load averages: 1.56, 2.13, 2.10

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.