Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I searched and found 2 options, none of which I'm confident provided me the answer.

1: cat /sys/block/sda/queue/rotational

This output '1' to stdout. What does this mean?

2: lshw -class disc

but couldn't find anything that answers my question.

share|improve this question
    
Is this a VPS or bare metal? –  David Schwartz Nov 7 '13 at 19:06
    
its VPS and i have root access –  amir bar Nov 7 '13 at 19:07
5  
The honor system. –  BigHomie Nov 7 '13 at 19:16
2  
@MDMoore313: Exactly. Quite frankly, if I had reason to even suspect my hoster would try to fool me like that, I would switch away immediately. –  Sven Nov 7 '13 at 19:36
    
This is not a technical problem... –  ewwhite Dec 25 '13 at 13:23

2 Answers 2

up vote 2 down vote accepted

Let's try to read 1000 random 4k blocks from first 16GB of a disk:

time for i in `seq 1 1000`; do
    dd bs=4k if=/dev/sda count=1 skip=$(( $RANDOM * 128 )) >/dev/null 2>&1;
done

This is something that should be very slow on rotating drive in comparison with SSD. On my desktop class SSD it ends in about a second. On desktop class 7200rpm rotating drive it ends in 10 seconds.

share|improve this answer
    
thank I got these respone: real 0m1.632s user 0m0.336s sys 0m0.939s it mean i am on ssd? –  amir bar Nov 8 '13 at 8:37
    
I'm pretty sure you are. –  Tometzky Nov 8 '13 at 12:44

In a physical machine (not a VPS), you can get the type with smartctl:

smartctl -a /dev/sda

and grep for Rotation:

smartctl -a /dev/sda | grep Rotation
Rotation Rate:    Solid State Device

smartctl -a /dev/sdb | grep Rotation
Rotation Rate:    5400 rpm

It's quite likely you have no chance to identify the disk type inside a VPS, as the hypervisor abstracts the real hardware away from the guest machines.

share|improve this answer
    
there is nothing i can install for exmaple that will check the write speed or something? becuose i am afraid that he gave me normal hd when he promised for ssd –  amir bar Nov 7 '13 at 19:15
2  
It's somewhat difficult inside a VPS because there are many factors affecting the disk speed, but at least the access times should be significantly better with a SSD as compared to normal disks. Try bonnie++ etc. –  Sven Nov 7 '13 at 19:29
3  
@amirbar you have to remember also that your VPS could be distributed amongst several drives and/or CPUs, I wouldn't worry too much about physical hardware as I would actual performance of the service you're trying to run on the VPS. SSDs are nice but not necessarily a requirement for most services. –  BigHomie Nov 7 '13 at 19:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.