On Thu, Apr 23, 2015 at 06:05:42PM +0800, Jones Syue wrote:> Hello Ervin, > > The in-memory cache lookup could be added back into > samba-4.1.6 by applying the attached patch, > if it could be compiled with Louis how-to steps,Patch didn't make it to the list. Can you point to a URL or ftp site containing the patch ?
Hello Jeremy, Sure here is the link to patch: https://drive.google.com/file/d/0B7hCXnjbSiXFWDltM2lwcVdCdGs/view?usp=sharing Based on this push: s3:passdb: do not use the in-memory idmap cache (it will be removed) https://git.samba.org/?p=samba.git;a=commit;h=c89affbd8da230cae6df25558fe621510690392c Not quite sure why remove it from git, perhaps will match new features or something new. Loop Michael too, if could help review and comment that will be great help, thank you. -- Regards, Jones Syue | ??? QNAP Systems, Inc.
Hi all, On Fri, Apr 24, 2015 at 07:58:46AM +0800, Jones Syue wrote:> > Based on this push: > s3:passdb: do not use the in-memory idmap cache (it will be removed) > https://git.samba.org/?p=samba.git;a=commit;h=c89affbd8da230cae6df25558fe621510690392c > > Not quite sure why remove it from git,the reason may be as elsewhere, where using cache: cache could store obsolote datas, which not matches with the real data. If user has a group membership in cache, but not in backend (real db), that can cause problems. But this is just an idea... :) Regards, Ervin
On Fri, Apr 24, 2015 at 07:58:46AM +0800, Jones Syue wrote:> Hello Jeremy, > > Sure here is the link to patch: > https://drive.google.com/file/d/0B7hCXnjbSiXFWDltM2lwcVdCdGs/view?usp=sharing > > Based on this push: > s3:passdb: do not use the in-memory idmap cache (it will be removed) > https://git.samba.org/?p=samba.git;a=commit;h=c89affbd8da230cae6df25558fe621510690392c > > Not quite sure why remove it from git, > perhaps will match new features or something new. > Loop Michael too, > if could help review and comment that will be great help, > thank you.OK, this functionality got moved into idmap_cache_find_XXXX() functions which allow smbd to look directly into the winbindd idmap cache via the uid_to_sid(), gid_to_sid(), sid_to_uid(), sid_to_gid() and sids_to_unixids() functions. These functions explicitly look inside the gencache tdb used for all generic caching (with expiry time) inside Samba, so this should be pretty efficient. Does this extra layer of in-memory caching really make such a difference on top of the caching we are already using in the gencache tdb ? Any chance of instrumenting this without your patch to find out why is makes such a difference ? Michael, do you have any good ideas on why removing the in-memory cache hurt performance so much ? Jeremy.