Discards appear like they are being sent to the device.  How big of a
temporary file did you create and then delete? Did you sync the file
to disk before deleting it? What version of qemu-kvm are you running?

On Tue, Mar 13, 2018 at 11:09 AM, Fulvio Galeazzi
<fulvio.galea...@garr.it> wrote:
> Hallo Jason,
>     thanks for your feedback!
>
> -------- Original Message -------->>   * decorated a CentOS image with
> hw_scsi_model=virtio--scsi,hw_disk_bus=scsi> > Is that just a typo for
> "hw_scsi_model"?
> Yes, it was a typo when I wrote my message. The image has virtio-scsi as it
> should.
>
>>> I see that commands:
>>> rbd --cluster cephpa1 diff cinder-ceph/${theVol} | awk '{ SUM += $2 } END
>>> {
>>> print SUM/1024/1024 " MB" }' ; rados --cluster cephpa1 -p cinder-ceph ls
>>> |
>>> grep rbd_data.{whatever} | wc -l
>>
>>
>> That's pretty old-school -- you can just use 'rbd du" now to calculate
>> the disk usage.
>
>
> Good to know, thanks!
>
>>>   show the size increases but does not decrease when I execute delete the
>>> temporary file and execute
>>>          sudo fstrim -v /
>>
>>
>> Have you verified that your VM is indeed using virtio-scsi? Does
>> blktrace show SCSI UNMAP operations being issued to the block device
>> when you execute "fstrim"?
>
>
> Thanks for the tip, I think I need some more help, please.
>
> Disk on my VM is indeed /dev/sda rather than /dev/vda. The XML shows:
> .....
>     <disk type='network' device='disk'>
>       <driver name='qemu' type='raw' cache='none'/>
> .....
>       <source protocol='rbd'
> name='cinder-ceph/volume-80838a69-e544-47eb-b981-a4786be89736'>
> .....
>       <target dev='vda' bus='scsi'/>
>       <serial>80838a69-e544-47eb-b981-a4786be89736</serial>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <controller type='scsi' index='0' model='virtio-scsi'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>     </controller>
>
>
> As for blktrace, blkparse shows me tons of lines, please find below the
> first ones and one of the many group of lines which I see:
>
>   8,0    0       11     4.333917112 24677  Q FWFSM 8406583 + 4 [fstrim]
>   8,0    0       12     4.333919649 24677  G FWFSM 8406583 + 4 [fstrim]
>   8,0    0       13     4.333920695 24677  P   N [fstrim]
>   8,0    0       14     4.333922965 24677  I FWFSM 8406583 + 4 [fstrim]
>   8,0    0       15     4.333924575 24677  U   N [fstrim] 1
>   8,0    0       20     4.340140041 24677  Q   D 986016 + 2097152 [fstrim]
>   8,0    0       21     4.340144908 24677  G   D 986016 + 2097152 [fstrim]
>   8,0    0       22     4.340145561 24677  P   N [fstrim]
>   8,0    0       24     4.340147495 24677  Q   D 3083168 + 1112672 [fstrim]
>   8,0    0       25     4.340149772 24677  G   D 3083168 + 1112672 [fstrim]
> .....
>   8,0    0       50     4.340556955 24677  Q   D 665880 + 20008 [fstrim]
>   8,0    0       51     4.340558481 24677  G   D 665880 + 20008 [fstrim]
>   8,0    0       52     4.340558728 24677  P   N [fstrim]
>   8,0    0       53     4.340559725 24677  I   D 665880 + 20008 [fstrim]
>   8,0    0       54     4.340560292 24677  U   N [fstrim] 1
>   8,0    0       55     4.340560801 24677  D   D 665880 + 20008 [fstrim]
> .....
>
> Apologies for my ignorance, is the above enough to understand whether SCSI
> UNMAP operations are being issued?
>
>   Thanks a lot!
>
>                         Fulvio
>



-- 
Jason
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to