FEMU icon indicating copy to clipboard operation
FEMU copied to clipboard

FEMU-SSD-size Setup

Open shou123 opened this issue 3 years ago • 1 comments

Basic on the femu structure: FEMU-SSD-size + VM-DRAM-size + 2-4GB (Host-OS) <= Total-DRAM-size-in-your-Host

I have host DRAM size = 50G, VM-DRAM-size = 4G. Theoritical, I can get more than 45G. But in fact, I only can allocate 20G for femu ssd size. If I allocate more than 20G. The system will pop out an error.

I set up code config as below: static void ssd_init_params(struct ssdparams spp) { spp->secsz = 512; spp->secs_per_pg = 8; spp->pgs_per_blk = 256; spp->blks_per_pl = 720; / 16GB */ spp->pls_per_lun = 1; spp->luns_per_ch = 8; spp->nchs = 8;

I change the ./run-block file as below: sudo x86_64-softmmu/qemu-system-x86_64
-name "FEMU-BBSSD-VM"
-enable-kvm
-cpu host
-smp 4
-m 4G
-device virtio-scsi-pci,id=scsi0
-device scsi-hd,drive=hd0
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow2,id=hd0
-device femu,devsz_mb=30720,femu_mode=1
-net user,hostfwd=tcp::8080-:22
-net nic,model=virtio
-nographic
-qmp unix:./qmp-sock,server,nowait 2>&1 | tee log

Error message: [FEMU] FTL-Err: start_lpn=6553536,tt_pgs=4194304

[FEMU] FTL-Err: start_lpn=7864304,tt_pgs=4194304

shou123 avatar Mar 08 '22 17:03 shou123

Your configuration seems ok to me. If you do a full-drive sequential write with 30720MB data, will it fail? If not, then it's ok to ignore the above FEMU error message. During the drive initialization phase, the OS might seek beyond the max supported LBA range.

huaicheng avatar Jun 01 '22 21:06 huaicheng