From: Laurent W. <lw...@hy...> - 2010-06-24 10:53:38
|
Hi, About the packet too long thread, I'd like to talk a bit about possible improvements before coding anything if needed. MaxPacketSize could be dynamically adapted, as the +900 in « if ((uint32_t) (main_time())<=starttime+900) », and so is the 14400 in « for (k=0 ; k<(NODEHASHSIZE/14400) && i<NODEHASHSIZE ; k++,i++) { ». Border-line to this, MFSMAXFILES could also be dynamically allocated to grow. First, please note I'm unsure that basing auto-adjust on number of chunks per server is the right way. If not, I guess you can trash almost evething down there :) I've looked quickly at the code, and it seems quite easy to do. The only thing is to find some good enough basic formulas so users don't or seldom meet these problems again. Some numbers to try to find the way: MaxPacketSize 50000000 works fine with 800000 chunks/server. MaxPacketSize 50000000 does not work with 4700000 chunks/server. MaxPacketSize 500000000 does work with 4700000 chunks/server. 50000000/800000=62.5 works 500000000/4700000~=106 works 50000000/4700000~=10.6 fails I don't know the inner working of mfs enough, but it may work if MaxPacketSize=number of chunks per server * 62.5, supposing the evolution of MaxPacketSize only needs to be linear. If not, maybe 50000000+(number of chunks per server-800000)/~115 would do the trick ? It would be great if fabien could try 62.5*4700000=293750000 for MaxPacketSize. Or if moosefs main devs could bring their knowledge into it. BUT, there are several definitions to MaxPacketSize: mfsmetalogger/masterconn.c #define MaxPacketSize 1500000 mfsmaster/matocuserv.c #define MaxPacketSize 1000000 mfsmaster/matomlserv.c #define MaxPacketSize 1500000 mfsmaster/matocsserv.c #define MaxPacketSize 50000000 mfschunkserver/masterconn.c #define MaxPacketSize 10000 mfschunkserver/csserv.c #define MaxPacketSize 100000 Of course, here, only mfsmaster/matocsserv.c is concerned. I guess the others are not as sensible about size or number of chunks. About starttime+x 150 works fine with 800000 chunks/server. 900 is proposed with 4700000 chunks/server. If linear is the way: 800k/150=5333.333… 4.7M/900=5222.222… so x=number of chunks per server/5300 may do the trick ? Or, if taking a minimum of 150, we'll get x=150+(number of chunks per server-800k)/6000 with of course number of chunks-800k being≥0. About NODEHASHSIZE/x 3600 works with 800k chunks per server. 14400 is proposed with 4.7M. Linear: 800k/3600=222.222… 4.7M/14400=326.388… x=number of chunks per server/222 ? or with 3600 minimum: x=3600+(number of chunks per server-800k)/361 with of course number of chunks-800k being≥0. About MFSMAXFILES: defaut is 5000 in code, Makefile pushes it to 10000. I've found no information about tuning it. Maybe we could simply use malloc for struct pollfd pdesc [MFSMAXFILES]; and use realloc to MFSMAXFILES+something if « if (setrlimit (RLIMIT_NOFILE,&rls)<0) { » is true ? Thoughts ? -- Laurent Wandrebeck HYGEOS, Earth Observation Department / Observation de la Terre Euratechnologies 165 Avenue de Bretagne 59000 Lille, France tel: +33 3 20 08 24 98 http://www.hygeos.com GPG fingerprint/Empreinte GPG: F5CA 37A4 6D03 A90C 7A1D 2A62 54E6 EF2C D17C F64C |