Drop_caches doesn't work on Solaris but works on RHEL6


 
Thread Tools Search this Thread
Operating Systems Solaris Drop_caches doesn't work on Solaris but works on RHEL6
# 1  
Old 11-05-2014
Drop_caches doesn't work on Solaris but works on RHEL6

Hello Experts,

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.Smilie
Could you please help me in figuring out the command that would do the trick on Solaris as it did on RHEL?

Thanks for your valuable time.Smilie

Regards,
Anirudh

Last edited by Anirudh Kumar; 11-05-2014 at 03:08 AM.. Reason: Spell check
# 2  
Old 11-05-2014
Hi,

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.

Regards

Dave
# 3  
Old 11-05-2014
You can drop a non ZFS based file system's cache with this command
Code:
lockfs -f /directory

with /directory being located in that file system.

If you use ZFS, one way is to export/import the pool.
# 4  
Old 11-05-2014
You can also drop non-ZFS file system caches for a file system by unmounting that file system.

I haven't tested that for a ZFS file system, but I think there's a good chance that it will work.
# 5  
Old 11-05-2014
Quote:
Originally Posted by achenle
You can also drop non-ZFS file system caches for a file system by unmounting that file system.
Yes, but that's more intrusive than using lockfs.
Quote:
I haven't tested that for a ZFS file system, but I think there's a good chance that it will work.
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

PING to AIX works but TELNET FTP SSH doesn't work

root@PRD /> rsh DR KFAFH_DR: protocol failure due to unexpected closure from server end root@PRD /> telnet DR Trying... Connected to DR. Escape character is '^]'. Connection closed. root@PRD /> ftp DR Connected to KFAFH_DR. 421 Service not available, remote server has closed connection... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Solaris

Mount command doesn't work on Solaris System

Hi All, I am using a solaris Sun-Fire-V440 server. The OS is solaris. My problem is whenever I run the command mount | grep "^/ " | sed -e 's,^.*dsk/\(*\).*$,\1,' it should return a disk value as "d30" as it does on each of my other servers.But on this server I am not getting any o/p from... (3 Replies)
Discussion started by: vivek.goel.piet
3 Replies

3. Shell Programming and Scripting

sed command works on Fedora/Ubuntu, but doesn't work in Mac

Hi, I have a question. I define a function using sed command: replace() { searchterm=$1 replaceterm=$2 sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp' mv $WORK'tempfile.tmp' $3 } Then I call replace 'test = 0' 'test = 1' $myfile This code... (1 Reply)
Discussion started by: Dark2Bright
1 Replies

4. Shell Programming and Scripting

sed command works on Fedora/Ubuntu, but doesn't work in Mac

Hi, I have a question. I define a function using sed command: replace() { searchterm=$1 replaceterm=$2 sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp' mv $WORK'tempfile.tmp' $3 } Then I call replace 'test = 0' 'test = 1' $myfileThis code works well in... (1 Reply)
Discussion started by: Dark2Bright
1 Replies

5. Solaris

Solaris 10, Samba 358 doesn't work after patching

Hi Forum, I updated my Solaris 10 (10/09) with the current Oracle patch file and moved the smb.conf to /etc/samba/smb.conf. Anyway, since patching, no Windows client is able to connect the share. It says password is wrong, but its the right pw. My smb.conf: bash-3.00# cat... (4 Replies)
Discussion started by: borsti007
4 Replies

6. Solaris

grep -e doesn't work on solaris

grep -e doesn't work in Soalris. Same script with grep -e worked on AIX/HP/LINUX.. I would like to search a list of patterns on "log.txt" like ... grep -e FATAL -e ERROR log.txt I get the error message as grep: illegal option -- e Usage: grep -hblcnsviw pattern file . . . (3 Replies)
Discussion started by: jmkraja
3 Replies

7. Solaris

Solaris Network doesn't work properly

Hi to all! I want to learn step by step easily how to configure my Solaris for network. I know alot about Solaris Network configuration. But I have some problems. When I install Solaris, and I plug-in my network cable to Solaris. Then I run: ifconfig -a plumb then I do ifconfig bge0 dhcp... (7 Replies)
Discussion started by: SecureXCode
7 Replies

8. UNIX for Dummies Questions & Answers

Mail/Xmail doesn't work on Solaris 10

Hi again everyone. I have recently installed Solaris 10 on a server. Everything seems to work fine (users can be added and can log in, internet connectivity works, etc). However I'm struggling to get mail or mailx to work. Say there are two users on my server, Bob and Mary. Server hostname... (3 Replies)
Discussion started by: EugeneG
3 Replies

9. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

10. UNIX for Advanced & Expert Users

rcp on solaris doesn't work

Hi I have 2 Solaris boxes A and B, A running solaris 9, and B running solaris 6. when i try to use rcp on A like this:- A> rcp file.txt B:/path/file.txt I get into standard input and nothing happens!! Then On the target machine B, if i try, B> rcp otherfile.txt B:/path/otherfile.txt... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies
Login or Register to Ask a Question