jonnyg@ROVER.UMD.EDU (Jon Greenblatt) (12/11/88)
I have been having trouble with the server running out of memory when running a large program using backing store. My default datasize is set to 6 meg but this is not enough when running some realy hungry X programs such as XPS. BTW XPS is available from expo.lcs.mit.edu via anonymous ftp in /oldcontrib/xps.tar.Z. I am using xdm to start my server and have come up with this temporary work around: I call xdm from the folowing program: /* biglimit.c */ #include <sys/time.h> #include <sys/resource.h> main(argc,argv) char *argv[]; { struct rlimit dlimit, slimit; if (argc > 1) { getrlimit(RLIMIT_DATA,&dlimit); getrlimit(RLIMIT_STACK,&slimit); dlimit.rlim_cur = dlimit.rlim_max; slimit.rlim_cur = slimit.rlim_max; /* The stack size does not realy need to be changed but I do it anyway */ setrlimit(RLIMIT_DATA,&dlimit); setrlimit(RLIMIT_STACK,&slimit); execvp(argv[1],argv+1); /* Call the program */ } } The calling sequence is as follows: biglimit xdm If you want just the server to have the big limits and not every thing called by xdm then just put biglimit on the call to the X server. Maybe this should be included in the server initialization code? It seems to me that turning on backing store in even a small 24 plane color window would cause havock. In the meantime biglimit.c is excelent for doing customizations with memory limits. Do a "man setrlimit" for more info on this. JonnyG. (jonnyg@umd5.umd.edu) (jonnyg@rover.umd.edu)
dshr@SUN.COM (David Rosenthal) (12/12/88)
I don't want to sound too much like Cassandra, but I hope the folks pushing non-virtual-memory X terminals read this from Jon Greenblatt: > I have been having trouble with the server running out of memory when > running a large program using backing store. My default datasize is > set to 6 meg but this is not enough when running some realy hungry X programs > such as XPS. I have pointed out for a long time: - that current X11 clients fail abruptly as soon as they get an Alloc failure from the server, - that making them survive Alloc errors is hard, because of the asynchronous nature of error notification, - that current X11 clients make little use of the memory-consuming parts of the X11 protocol, because these are the parts that weren't there in X10, - and that this is skewing our ideas of how much memory an X11 server in normal use will require. Unless the X community works out how to write clients that don't simply collapse at the first hint of resource exhaustion, the suppliers of X terminals are going to have a lot of VERY unhappy customers. Remember, my experiments over a year ago showed that even a 0.5% alloc failure rate rendered the system totally unusable. I have seen no discussion of this problem in the past year. I hope you all out there aren't just sticking your heads in the sand...... David.