I am performing performance tests on a few mysql select queries.
I use the following command to clear the memory disk caches. sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
I however see that the above command works on RHEL6 but doesn't work on Solaris 10.
I asked google but didn't get the solution.
Could you please help me in figuring out the command that would do the trick on Solaris as it did on RHEL?
The "drop_caches" function is only available in later (after kernel 2.6.16 I think" linux, I think the equivalent command in Solaris are the "inter process cache" commandds.
You'll have to read up on the "ipcss" and the "ipcrm" command, from the man pages. However on Solaris, your DFS can make a huge difference as with ZFS you'll have caches in places you wouldn't think you'll have them.
That likely won't work. Unlike with traditional file systems, data can be shared between ZFS file systems belonging to the same pool so the cache is working at the pool level. Outside exporting importing the pool containing the file system which I already suggested but that is not achievable with the root pool, another way might be to dynamically reduce the ARC max size and perhaps allocate some RAM for the OS to release pages. This will affect all ZFS datasets though.