evolvah
evolvah

Reputation: 645

Syscall overhead in Solaris vs Linux

A while ago, I asked a question about the cost of a syscall in Solaris 10 on SPARC hardware. In the past few months, this issue has resurfaced a few times and here is what I found.

If we take a synthetic test where a 300MB file is read from disk in 256-byte blocks, it takes substantially longer in Solaris 10 then it does in Linux. The test is done in the following fashion:

dd if=test.dat of=/dev/null bs=256

Even if test.dat is stored on a memory-mapped file system like /tmp, Linux outperforms Solaris by a big margin. It seems like the overhead of going back and forth between user space and kernel space is substantially higher in Solaris than it is in Linux, even when both run on same hardware.

I have two questions:

  1. Is it some kind of a know disadvantage of Solaris over Linux?
  2. Is there a way to tune Solaris to match Linux numbers assuming that I cannot increase the size of an I/O block from 256?

Thank you!

Upvotes: 2

Views: 651

Answers (2)

Sean Flynn
Sean Flynn

Reputation: 81

I assume you've made this a true apples-to-apples comparison whereby the Solaris and LINUX boxes are identical in performance/capacity? Anyways, some key questions to help you through this:

1) If you run the command vmstat 1 while this dd is running, what types of numbers do you get on the Solaris 10 box vs. the LINUX box?

2) What is the elapsed time of that operation? I'm seeing barely 2 seconds on my PC running Solaris 10 x86 to do that...

3) Try using a fully qualified path for your if parameter (i.e. if=/tmp/test.dat vs if=test.dat) just to make doubly sure you are running off of /tmp.

Sean.

Upvotes: 2

hungnv
hungnv

Reputation: 150

You should include more information in your question. In my opinion, your problem is about file system, it's not about the operation system. XFS allows file systems to be created with block sizes ranging between 512 bytes and 64 kilobytes, allowing the file system to be tuned for the expected use. On Solaris, the default file system is xfs, so 256 bytes block size is not a good parameter, could you please increase it to 512 to see what happen?

Upvotes: 1

Related Questions