Thanks P,

I have that setup as you suggested but I'm not entirely sure the sage users
are being limited (I seemed to be able to go over the limit):

Running:

import os
os.system('ulimit')

in the notebook returns:

unlimited
0

Assuming the username running Sage is 'vince' (it's not but I'm not sure
what info is safe to put out there) I have typed (just copying what you
had, at the top of the sage file just after comments about the license):

if [ "${vince/sage}" != "$vince" ]; then
    # put a limit per user of 1.5G; you can change the other limits too.
    # 3D plots might need more than 1G iirc, otherwise for light
    # computation 1-1.2G should be ok.
    ulimit -u 100 -t 3600 -v 1500000
fi

in the sage file (in a directory in  USER/sage/). I then run this using the
following in a bash script:

~/sage/sage -c "notebook(interface='localhost',
directory='./sage_notebook.sagenb',port=8000, accounts=True, timeout=1200,
server_pool=['sage%d@localhost'%i for i in range(100)], open_viewer=None)"

Am I missing something (I have a feeling that my if statement is not at all
right in the bash above)? A bit at a loss so any further help is greatly
appreciated...

Vince



On 25 November 2013 23:30, P Purkayastha <ppu...@gmail.com> wrote:

> On 11/26/2013 02:04 AM, Vincent Knight wrote:
>
>> Thanks P,
>>
>> That's very useful (it probably explains the problems we were having).
>> Just to clarify (before I restart our server again as I have quite a few
>> active users on right now), would the following in a bash script do the
>> job:
>>
>> ulimit -u 100 -t 36000 -v 500000
>> sage notebook(interface='localhost',
>> directory='./sage_notebook.sagenb',port=8000, accounts=True,
>> timeout=1200, server_pool=['sage%d@localhost'%i for i in range(100)],
>> open_viewer=None)
>>
>
> This puts an overall limit on the parent sage process. Since you are
> running using a server pool, the way I typically run the server is put a
> limit on every child sage process. This needs something like the following
> at the top of the SAGE_ROOT/sage file:
>
> # Adapting to your username
> if [ "${USER/sage}" != "$USER" ]; then
>     # put a limit per user of 1.5G; you can change the other limits too.
>     # 3D plots might need more than 1G iirc, otherwise for light
>     # computation 1-1.2G should be ok.
>     ulimit -u 100 -t 3600 -v 1500000
> fi
>
>
>
>> Also, what is a reasonable limit on the memory, could I get away with
>> 250000? I realise that this is asking how long a piece of string is but
>> just checking what is a reasonable limit for student day to day use.
>>
>>
> If I recall correctly, every new user takes up another 800M or so of
> virtual memory. So, a 4G system is a bit low if you want to have a couple
> of users. If you have 100 users, then 8G is definitely too low. You will
> need at least 20-25G of memory to run the server properly.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Dr Vincent Knight
Cardiff School of Mathematics
Senghennydd Road,
Cardiff
CF24 4AG
(+44) 29 2087 5548
www.vincent-knight.com
+Vincent Knight
@drvinceknight
Skype: drvinceknight

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to