On Sat, 30 Apr 2005, Tzahi Fadida wrote: > Well, I tried to do the O_DIRECT but its not so simple as just adding > and just using the posix_memalign.
errr... why? cause the buffer sizes must also be multiples of 512 bytes each? > Anyway, I was trying something else. > I disabled the swap file to make things easier. > then I allocate by trial and error around 120MB memory, > mlock()(not needed unless I use swap) it and see if the program is not > killed. > Then, I run the query and its not using all the cache, around > half for a simple select query. > I think I can work with this. > Is there a way to remove this trial and error by knowing somehow > how much physical memory I have to allocate or at least > doing the trial and error inside the program and not getting it > killed? i don't realy see what you're trying to do here. the system uses _all_ available ram for caching. there is no "cache size" or "cache size limit". (almost) all the RAM is used for something, or else it is just a waste. if you lock up a lot of memory, you'll not have memory for other programs that might need it (or you're locking the memory inside the program that is doing the query? but doesn't the database process itself require memory in order to run the query? did you make it, too, pre-allocate and lock memory somehow, without disrupting the workings of malloc() and free()?). so if you simply pre-allocate a lot of memory, it means you're going to choke your own test programs. i don't see where that leads you to. -- guy "For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]